-
Notifications
You must be signed in to change notification settings - Fork 1.3k
compile ok, but --watch mode not work. #2300
Comments
@GongT I believe watch requires a change in your source files to be triggered... Once the If you use npm scripts inside your Let's see an example using a "scripts": {
"css-compile": "node-sass --output dist/css styles/index.scss",
"precss-watch": "npm run css-compile",
"css-watch": "npm run css-compile -- -w"
} In this first example running
I prefer using Let's see an example using "scripts": {
"css-compile": "node-sass --output dist/css styles/index.scss",
"css-watch": "npm run css-compile && npm run css-compile -- -w"
} Let me know if it helps and close the issue if you are satisfied. |
I not even try to modify any file, LOL... |
I ran into the same issue, just go to View-Extensions- and download the “Live Sass Compiler”. This will automatically watch your sass code and create a main.css file without you having to manually run it in the terminal. |
npm -v
): 5.7.1node -v
): v9.4.0node -p process.versions
):node -p process.platform
): linuxnode -p process.arch
): x64node -p "require('node-sass').info"
):npm ls node-sass
):./node_modules/.bin/node-sass
successed log:
node-sass --output dist/css styles/index.scss
Rendering Complete, saving .css file...
Wrote CSS to /data/DevelopmentRoot/projects/universal-meme/dist/css/index.css
failed log:
node-sass --output dist/css styles/index.scss -w
<-- hang there, no file generated.
The text was updated successfully, but these errors were encountered: