1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-external-scoped-css
Tim Neutkens 7f0591896a Use latest version of Next for all examples (#1597)
* Use latest for all examples

* Update yarn.lock
2017-04-03 09:46:35 +05:30
..
pages Example to create next application with scoped/external css. (#1340) 2017-03-15 15:21:48 +01:00
.babelrc Example to create next application with scoped/external css. (#1340) 2017-03-15 15:21:48 +01:00
.gitignore Example to create next application with scoped/external css. (#1340) 2017-03-15 15:21:48 +01:00
package.json Use latest version of Next for all examples (#1597) 2017-04-03 09:46:35 +05:30
pre-processor.js Example to create next application with scoped/external css. (#1340) 2017-03-15 15:21:48 +01:00
README.md Example to create next application with scoped/external css. (#1340) 2017-03-15 15:21:48 +01:00

Scoped Style with external CSS file

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..

Running That

yarn install
yarn start

Supported Langs

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

To edit the types you need to go to .babelrc

Attention Points

  • 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.