cannot enable css module and vanilla css at the same time #14946
Unanswered
1846689910
asked this question in
Help
Replies: 1 comment 4 replies
-
By using If you remove those plugins you should be able to import global CSS inside
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi next.js team,
I have a project built from next.js and I want to use both global stylesheet and local module stylesheet (including css, less, scss and stylus). I found that I can either use
cssModules
or without css modules not both.project url https://github.com/1846689910/type-18-next/tree/e-dev on e-dev branch
the deploy on this branch https://type-18-next-71uzw4wum.vercel.app/
my next.config.js:
I have import vanilla stylesheets in
src/pages/_app.jsx
:and import module stylesheet in
src/client/js/components/Home/ModuledStyleDemo.jsx
:but I can only have moduled stylesheet work, but global css not working

I expect all the letters have color
it seems the
cssModules:true
in next.config.js will transpile all the css no matter.css
and.module.css
. Is there any way I can setup which stylesheet name convention should be moduled and which should not use css modules?Would you please give me some idea on my issue to make both module stylesheet and vanilla stylesheet work?
Beta Was this translation helpful? Give feedback.
All reactions