to webpack.rules and this casses the following errors to be thrown when I try to build:
Failed to compile with 3 errors.
ERROR in ./src/sass/_styles.scss
Module build failed:
@import "_route2";
^
Media query expression must begin with '('
in /Users/modsoussi/CS/React/react-code-splitting-test/src/sass/_styles.scss (line 2, column 1)
@ ./src/sass/_styles.scss 4:14-319
@ ./src/index.js
@ multi /usr/local/lib/~/nwb/polyfills.js ./src/index.js
ERROR in ./src/sass/_styles.scss
Module build failed: Error
at /usr/local/lib/node_modules/nwb/node_modules/webpack/lib/NormalModule.js:141:35
at /usr/local/lib/node_modules/nwb/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /usr/local/lib/node_modules/nwb/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/usr/local/lib/node_modules/nwb/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.onRender [as callback] (/Users/modsoussi/CS/React/react-code-splitting-test/node_modules/nwb-sass/node_modules/sass-loader/index.js:273:13)
at Object.<anonymous> (/Users/modsoussi/CS/React/react-code-splitting-test/node_modules/async/dist/async.js:2237:31)
at apply (/Users/modsoussi/CS/React/react-code-splitting-test/node_modules/async/dist/async.js:20:25)
at Object.<anonymous> (/Users/modsoussi/CS/React/react-code-splitting-test/node_modules/async/dist/async.js:56:12)
at Object.callback (/Users/modsoussi/CS/React/react-code-splitting-test/node_modules/async/dist/async.js:843:16)
at options.error (/Users/modsoussi/CS/React/react-code-splitting-test/node_modules/node-sass/lib/index.js:294:32)
ERROR in /Users/modsoussi/CS/React/react-code-splitting-test/src/sass/_styles.scss doesn't export content
However, when I put the sass block inside a sass-style, like so:
everything works fine. I thought this was strange and thought I'd let you know. Also, if I want to compile my src/sass files into css and put those files in dist/css how do I go about that?
This issue is a:
These checks might help you diagnose whether something is wrong with nwb or your setup:
Is the version of
nwb
you're using installed globally or locally?globally
Which modules are installed in your project?
Which versions of Node.js, npm and nwb are you using (if using it globally)?
I'm trying to use
sass
in my project and in doing so I installednwb-sass
and addedto
webpack.rules
and this casses the following errors to be thrown when I try to build:However, when I put the
sass
block inside asass-style
, like so:everything works fine. I thought this was strange and thought I'd let you know. Also, if I want to compile my
src/sass
files intocss
and put those files indist/css
how do I go about that?Thanks for the awesome work, I'm loving
nwb
!