-
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
Changing next's dir option won't load compiled css file #4004
Comments
Try to put your pages folder under the root not in src --pages |
The pages works well, it's just the CSS file who won't load. |
Try upgrading to next@canary. |
This is my folder structure @DWboutin , // next.config.js
const withSass = require('@zeit/next-sass')
module.exports = withSass({
cssModules: true,
cssLoaderOptions: {
importLoaders: 1,
localIdentName: "[local]___[hash:base64:5]",
}
}) |
@timneutkens Works perfectly! You rock! Thanks |
I changed the Next.js config to handle the structure like I wanted but, the generated css file won't load the same way.
I load my css file like this
When I put everything outside the src folder, like suggered, it works.
Expected Behavior
My CSS file must load the same way if I specify a dir path or not.
Current Behavior
When I specify a dir path, Next won't load my CSS file compiled with @zeit/next-sass
Steps to Reproduce (for bugs)
Context
I'm trying to have a cleaner structure. I'm not a fan of all the things at the root level.
Your Environment
The text was updated successfully, but these errors were encountered: