-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Stylesheet not included in next export
build
#3712
Comments
I ran into the same issue. Until this get's a proper fix. I added this to my "export": "next build && next export && cp -R ./.next/static ./out/_next/static/" |
We actually fixed this. We'll ship a stable release soon. |
Can confirm this is fixed in |
Just tried the 5.0.1-canary.6 -- the stylesheet is now linked properly when assetPrefix is not defined in next.config.js, but fails when it is defined. Script files are included as |
The same problem!!! Not included with build, but working in dev. _document package |
I've just started moving an app over to Next v5. I'm doing this in small chunks, and have just finished a page. In order to verify it in production-mode, I ran the build (
NODE_ENV=production next build && NODE_ENV=production next export
). Thestyles.css
file is correctly build/saved to./.next/static/styles.css
, but it is not included in the exported build (./out/**
).This results in 404s when requesting the stylesheet.
Expected Behavior
The stylesheet should be included in the exported build.
Current Behavior
The stylesheet is not included in the exported build.
Steps to Reproduce (for bugs)
@zeit/next-css
to yournext.config.js
next build
next export
serve ./out
curl http://localhost:3000/_next/static/style.css
to see the 404Context
This has prevented me from migrating to Next v5.
Your Environment
The text was updated successfully, but these errors were encountered: