Open RoyTinker opened 6 years ago
Thanks for the issue. Sass graph should ignore url
imports.
Is there any planned fix for this? This is breaking my node-sass build pipeline and seems to be a very common error case.
We just encountered this issue as well -- seems to be happening for multiple imports regardless of if they are consecutive
(mostly) reduced test case: https://github.com/RoyTinker/node-sass-watch-import-css-bug
CSS:
@import url(http://some-site.com/fonts/1); @import url(something.css);
Error:
/[redacted]/node_modules/sass-graph/parse-imports.js:20 throw new Error('Encountered invalid @import syntax.'); ^ Error: Encountered invalid @import syntax. at parseImports (/[redacted]/node_modules/sass-graph/parse-imports.js:20:15) at Graph.addFile (/[redacted]/node_modules/sass-graph/sass-graph.js:69:17) at /[redacted]/node_modules/sass-graph/sass-graph.js:54:13 at arrayEach (/[redacted]/node_modules/lodash/lodash.js:537:11) at Function.forEach (/[redacted]/node_modules/lodash/lodash.js:9359:14) at new Graph (/[redacted]/node_modules/sass-graph/sass-graph.js:53:7) at Object.module.exports.parseDir (/[redacted]/node_modules/sass-graph/sass-graph.js:156:17)
I was getting the same error when I was working with the multiple sass files My mistake was @import "folder-name/file-name" (Here i forgot to add a semicolon ; ) but when I have added the semicolon Everything works perfect
(mostly) reduced test case: https://github.com/RoyTinker/node-sass-watch-import-css-bug
CSS:
Error: