rsnext/examples/with-styled-jsx-scss
Mileta Dulović 3892453cd7
Fixed bug where styled-jsx examples don't work because of a wrong plugin (#23414)
## Bug

Fixes #23293. 

Problem was that `styled-jsx-plugin-sass` was used instead of `@styled-jsx/plugin-sass` so it didn't work. 

You can refer to the issue that is linked for more info.
2021-04-19 19:37:22 +00:00
..
pages Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
.babelrc Fixed bug where styled-jsx examples don't work because of a wrong plugin (#23414) 2021-04-19 19:37:22 +00:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Fixed bug where styled-jsx examples don't work because of a wrong plugin (#23414) 2021-04-19 19:37:22 +00:00
README.md Include utm_source on example links to vercel.com (#21305) 2021-01-19 07:28:54 +00:00

With styled-jsx SASS / SCSS

Next.js ships with styled-jsx allowing you to write scope styled components with full css support. This is important for the modularity and code size of your bundles and also for the learning curve of the framework. If you know css you can write styled-jsx right away.

This example shows how to configure styled-jsx to use external plugins to modify the output. Using this you can use PostCSS, SASS (SCSS), LESS, or any other pre-processor with styled-jsx. You can define plugins in .babelrc. This example shows how to implement the SASS plugin.

More details about how plugins work can be found in the styled-jsx readme

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-styled-jsx-scss with-styled-jsx-scss-app
# or
yarn create next-app --example with-styled-jsx-scss with-styled-jsx-scss-app

Deploy it to the cloud with Vercel (Documentation).