Next.js: Use an external SCSS

Created on 28 Mar 2017  路  6Comments  路  Source: vercel/next.js

I am trying to use a single SCSS file, that includes all the other files. I don't want to include CSS code in my JS files. How can i compile this using Webpack? Is it actually possible here?

Most helpful comment

@warrenday Im having the same issue, were you able to solve it?

All 6 comments

can this done for components too but scoped. this example fails on linux

https://github.com/zeit/next.js/tree/master/examples/with-external-scoped-css

The example works with files with the .sass extension but compiles nothing for .scss files, even when .scss is added to the extensions array in the .babelrc file. Any idea why?

@warrenday Im having the same issue, were you able to solve it?

@aviramga Sorry had no luck with that!

@aviramga @warrenday I see the example has indentedSyntax set to true in the pre-processor.js file. According to the node-sass README, this option should be set true when compiling SASS.

I'm not sure if removing that line or setting that option to false might solve your problem, but you should give it a try!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

renatorib picture renatorib  路  3Comments

pie6k picture pie6k  路  3Comments

sospedra picture sospedra  路  3Comments

jesselee34 picture jesselee34  路  3Comments

YarivGilad picture YarivGilad  路  3Comments