This happens after the next.js update. I recommend using the package @webdeb/next-styles. It makes using scoped *.scss files as simple as in CRA.
@webdeb/next-styles
The example of the next.config.js using this package:
next.config.js
// next.config.js const withStyles = require('@webdeb/next-styles') module.exports = withStyles({ sass: true, // use .scss files modules: true, // style.(m|module).css & style.(m|module).scss for module files })
I hope this will help you :)
do i still need to run this command "npm install --save @zeit/next-sass node-sass" after installing this package
According to nextjs.org/docs/basic-features/bui... you just need to run npm install sass / yarn add sass / pnpm add sass
npm install sass / yarn add sass / pnpm add sass
thanks
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This happens after the next.js update. I recommend using the package
@webdeb/next-styles
. It makes using scoped *.scss files as simple as in CRA.The example of the
next.config.js
using this package:I hope this will help you :)
do i still need to run this command
"npm install --save @zeit/next-sass node-sass"
after installing this package
According to nextjs.org/docs/basic-features/bui... you just need to run
npm install sass / yarn add sass / pnpm add sass
thanks