Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

进入开发模式之后再次改变src/comon/styles 下的SCSS代码没法热更新即时显示 #2

Open
ACERY1 opened this issue Feb 12, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@ACERY1
Copy link
Member

ACERY1 commented Feb 12, 2018

在组件中导入了一个 @import "./common/styles/index";

但是在改变index.scss后没有即时显示。

原因:

wepy的 --watch选项只监听了被改变的文件,而没有一并监听引用该文件的文件,当更新index.scss后,组件中import的scss代码不会改变。

解决办法,在wpy组件内部导入 <style src="../common/styles/index.scss" lang="scss"></style> 而不是用import,但是不使用import会造成无法使用规定好的variables

@ACERY1 ACERY1 added the bug Something isn't working label Feb 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant