importing .scss files
See original GitHub issueHi there,
i have installed sass-loader and node-sass to my project and added this line into my webpack.config.babel.js and webpack.config.dev.js
{
test: /\.scss$/,
loader: 'style-loader!css-loader?localIdentName=[name]__[local]__[hash:base64:5]&modules&importLoaders=1&sourceMap!postcss-loader!sass-loader'
},
but I am always getting this error when importing .scss file:
/Users/mmintel/Projekte/writr/node_modules/react-toolbox/lib/app_bar/theme.scss:1
(function (exports, require, module, __filename, __dirname) { @import "../colors";
^
SyntaxError: Unexpected token ILLEGAL
What’s wrong with it?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11
Top Results From Across the Web
Sass: @import
Sass imports have the same syntax as · When Sass imports a file, that file is evaluated as though its contents appeared directly...
Read more >Sass @import and Partials - W3Schools
Sass Importing Files ... Just like CSS, Sass also supports the @import directive. The @import directive allows you to include the content of...
Read more >Sass - Importing files and partials - TutorialsTeacher
One of the best uses of the Sass @import directive is to create separate files containing all the standard definitions for your site-colors,...
Read more >Sass/SCSS Importing Tutorial - KoderHQ
Sass allows us to create small snippets of code in separate files and combine them into a single compiled CSS file, similar to...
Read more >Include `.scss` file in another `.scss` file? - sass - Stack Overflow
You can include a partial by doing this: @import "partial";. The imported file needs an underscore, so sass will recognize it to be...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mmintel or @p-le did either of you resolve your sass issues? Hitting the same error.
I ran into the same problem today. I found out the following configuration worked:
webpack.config.babel.js:
webpack.config.dev.js:
webpack.config.prod.js:
Does that work for you? The magic here is
css-loader/locals
inwebpack.config.babel.js
which only exports identifier mappings.