The motivation for this example is using scoped css from external files and in the end generate a compiled static .css file to use in production..
yarn install
yarn start
The plugin supports the less, scss and css file extensions. It is possible to add support for another pre-processor by creating a function to compile the code. In the example we use sass as our css pre-processor
You need to edit the .babelrc and sometimes the pre-processor.js to work with another languages, if you want to use SCSS the solution and explanation (fit with other css-pre-processors) are in this issue <3 #3053
- Next.js doesn't have support for watching `*.css files. So you will have to edit a Javascript file to re-compile the css. In the future this will be fixed by #823.