node-sass --watch doesn't look @import files.
- NPM version (
npm -v): 6.12.0 - Node version (
node -v): 12.13.0 - Node Process (
node -p process.versions):{ node: '12.13.0', v8: '7.7.299.13-node.12', uv: '1.32.0', zlib: '1.2.11', brotli: '1.0.7', ares: '1.15.0', modules: '72', nghttp2: '1.39.2', napi: '5', llhttp: '1.1.4', http_parser: '2.8.0', openssl: '1.1.1d', cldr: '35.1', icu: '64.2', tz: '2019a', unicode: '12.1' } - Node Platform (
node -p process.platform): win32 - Node architecture (
node -p process.arch): x64 - node-sass version (
node -p "require('node-sass').info"): node-sass 4.13.0 (Wrapper) [JavaScript] libsass 3.5.4 (Sass Compiler) [C/C++] - npm node-sass versions (
npm ls node-sass): C:\laragon\www\drupal `-- [email protected]
Hey folks, I have a problem. I'm trying to run a node-sass --watch but my main.scss has many imports such as:
node-sass --importer node_modules/node-sass-glob-importer/dist/cli.js --output-style compressed -o $npm_package_config_public/css $npm_package_config_source/css
My main.scss :
// Variables @import "variables";
// Base-theme overrides. @import "overrides";
// Global definitions @import "global/**/*";
And the problem here is, that when I wanna change something related to variables or overrides files. Node-sass didn't build the style. but if I add code to my main.scss yes...
PD: variables and overrides are named as _overrides.scss and _variables.scss
I'd like help from your side because I tried to search for this problem in this repository without luck.
-
node-sass --importer node_modules/node-sass-glob-importer/dist/cli.js --output-style compressed -o $npm_package_config_public/css $npm_package_config_source/css2does not watch. What is your invocation with--watch? -
Is it possible to reproduce this problem without
--importer node_modules/node-sass-glob-importer/dist/cli.js? node-sass command line watcher has no idea where the files imported by the custom importer come from.
I have the same issue with node-sass. In my style directory I'm using a global.sass file that is only a list of @import of other files in the same directory. Modifying one of these imported files does nothing when watching global.sass.
@saper is impossible to extend the watching to imported files when watching a global/index/main/younameit file with imports? Is it going to be the same in v5? I made the same comment in a similar node-sass-chokidar issue, so it looks like the cause is on the node-sass side :wink: