Topic: How to implement SaSS with NextJS
Expected behavior I expect theming to work according to these instructions.... https://mdbootstrap.com/docs/react/content-styles/theme/
Actual behavior Using those instructions with NextJS just causes the application to hang. I have also tried moving the sass folder into the NextJS styles folder and that does not work either. and I have tried installing sass-loader in addition to sass however, if I just import "mdb-react-ui-kit/dist/css/mdb.min.css"; but I cannot change colors.
Resources (screenshots, code snippets etc.)
Grzegorz Bujański staff answered 2 years ago
If I understand correctly, it turned out that since NextJS v13.1.2 there is a problem with using Sass in NextJS and it is not strictly related to a bug in our package? We'll take a look at this and see what needs to be done to keep Sass working with NextJS correctly.
Two Aow pro premium priority commented 2 years ago
Yes,. This has nothing to do with MDBootstrap. It is a bug in NextJS > 13.1.1. But I thought I would leave the question to help anyone else facing the same issue.
Two Aow pro premium priority answered 2 years ago
I figured this out. NextJS 13.1.2 and above has a breaking change to their implementation of SASS. BEWARE: if you are using SASS, use only 13.1.1 and below.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB React
- MDB Version: MDB5 5.1.0
- Device: MacBook Pro
- Browser: Chrome Version 109.0.5414.87 (Official Build) (x86_64)
- OS: macOS Ventura
- Provided sample code: No
- Provided link: Yes