-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I have a separate CSS or SASS folder? #3025
Comments
Are you using any of the predefined examples on how to use imported styling?
|
Yes, this one: https://github.com/zeit/next.js/tree/master/examples/with-scoped-stylesheets-and-postcss. As per above. For some reason I cannot place the stylesheets in a folder outside of |
Okay great, thanks for checking @thomaslindstrom ❤️ |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
I am using your CSS example to add postcss to my project but unless I put my css inside the
./pages
folder I get an undefined error.import {stylesheet, classNames} from 'css/styles.css'
I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
For the
paragraph
class fromstyles
to render..paragraph { composes: font-color from 'global.css'; font-size: 20px; color:red; }
Current Behavior
My next.config.js file is as follows:
The only time this works is if I add all the CSS files inside the
./pages
directory which I find will become messy and bloated. I am using React.js with Next.js. I presume the same problems will arise if I add an./assets
folder at the same level as./pages
. How can I keep the file types separated and/or for<style dangerouslySetInnerHTML={{__html: stylesheet}} />
to render an external stylesheet instead of styles?The text was updated successfully, but these errors were encountered: