Commons css chunk served with cache-control: public, max-age=0 header.
Expect the bundle to be served immutable, preferably with the same caching header as the js bundle (cache-control: public, max-age=31536000, immutable).


My next.config.js, not doing anything crazy here. Feel free to check it out live here.
Since our nextjs server is behind an nginx reverse proxy anyway I'm now just forcing the Cache-Control header on all static assets.
location ~ \.(?:ico|css|js|gif|jpe?g|png|webp|gif|svg)$ {
proxy_pass http://next:3000;
proxy_hide_header Cache-Control;
add_header Cache-Control "public, max-age=31536000, immutable";
}
I believe this issue was resolved in PR #335 within the code here on github, however when you install @zeit/next-css via npm or yarn I'm getting a version which still outputs the css to static/css instead of the newly updated static/chunks as per the PR. @timneutkens is there any timeline on when this fix will be pushed to npm? I'm still having this issue and have a massive build that's getting close to production release, so would really love to be able to resolve this :)
I believe this issue was resolved in PR #335 within the code here on github, however when you install
@zeit/next-cssvia npm or yarn I'm getting a version which still outputs the css tostatic/cssinstead of the newly updatedstatic/chunksas per the PR. @timneutkens is there any timeline on when this fix will be pushed to npm? I'm still having this issue and have a massive build that's getting close to production release, so would really love to be able to resolve this :)
For some reason all these wonderful fixes have been hiding in the canary channel.
This should install next-css with the necessary fixes: npm install --save @zeit/[email protected]
@charles4221 @wouterds
This bug seems to be back with the built-in CSS support in nextjs with nextjs 9.2
@haf just checked and looks fine:

Note that if you use @zeit/next-sass / @zeit/next-css built-in support is disabled.
@tim-phillips

next@^9.2.0:
version "9.2.0"
resolved "https://registry.yarnpkg.com/next/-/next-9.2.0.tgz#1adc85ad45143114cd22e6a68337f56319cd59d2"
integrity sha512-c4gyJotZHuvq9dslum+Z2Z21jjb9qWMYybV+IS9yEg7hTjs8OyKU59snyJ1Bi0ul84OdyLOZ4ytjch9zMw9lEQ==
dependencies:
const express = require('express')
const next = require('next')
const port = parseInt(process.env.PORT, 10) || 3000
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
app.prepare().then(() => {
const server = express()
server.disable('x-powered-by')
server.all('*', (_, resp, next) => { resp.vary('accept-language'); next() })
server.all('*', handle)
server.listen(port, err => {
if (err) throw err
console.log(`> Ready on http://localhost:${port}`)
})
}).catch(ex => {
console.error(ex.stack)
process.exit(1)
})
Also, as you can see, we're removed those packages you mention:

You're not on the latest version of Next.js, please upgrade.
Indeed, the last two patch versions seems to have fixed it! Thanks :)
Most helpful comment
Since our nextjs server is behind an nginx reverse proxy anyway I'm now just forcing the Cache-Control header on all static assets.