Im using Next Js 6.0.x
When Im in Dev Mode my Stiles are loaded fine (im using sass)
But when I create a Build, Styles doest loaded, someone knows something about that??
Might be related to #177
I'm having the same issue, but using Postcss.
@jakeleboeuf the fix for plain css seemed to be to move the import to the page level, and not in the _document file, maybe this will work for postcss as well?
make sure you update @zeit/next-sass and @zeit/next-css to 0.2.0, solves this issue
None of the solutions worked for me. I got the problem when I use "node server.js". The style.css file is not created, only using in dev mode "next". I am also using sass.
Any updates on this one? I have the same issue ? @and3rsonsousa
Same issue
What do you guys ee when you type npm ls @zeit/next-sass and npm ls @zeit/next-css?
npm ls @zeit/next-sass
βββ @zeit/[email protected]
npm ls @zeit/next-css
βββ @zeit/[email protected]
βββ¬ @zeit/[email protected]
βββ @zeit/[email protected] deduped
@markolofsen @aequasi
I have the same issue too. But I soon found that the reason of styles not loading while using react routing in dev mode, might be using multi type of css languages. In my case I used sass and css in the same _document.js. Problem was saolved when I only use sass.
I think the config might be related to the problem. Here's my config in next.config.js:
const withCSS = require('@zeit/next-css')
const withSass = require('@zeit/next-sass')
const commonsChunkConfig = require('@zeit/next-css/commons-chunk-config')
const config = withCSS(withSass({
webpack: (config, {isServer}) => {
if (!isServer) {
config = commonsChunkConfig(config, /\.(sass|scss|css)$/)
}
return config
}
}))
module.exports = config
@webtjw yes, I I prefered css in js instead sass βΒ that's work.
Most helpful comment
@markolofsen @aequasi
I have the same issue too. But I soon found that the reason of styles not loading while using react routing in dev mode, might be using multi type of css languages. In my case I used sass and css in the same
_document.js. Problem was saolved when I only use sass.I think the config might be related to the problem. Here's my config in
next.config.js: