-
Notifications
You must be signed in to change notification settings - Fork 27k
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
assetPrefix not working in Production #4799
Comments
Should work fine, we have zeit.co/docs nextjs.org/learn both using assetPrefix in production. Also, Next.js has integration tests for assetPrefix, so I wonder if you could provide a minimal example in a GitHub repository |
Hmm the code base I am working on is very large and I have a feeling it is going to take me a very long time to reproduce this issue, even minimally. A lot of config has gone into this. I am setting assetPrefix in my next config and then reference the path in my server config. Anything else I need to do?? In my build files, is there somewhere I can look to debug this? I checked my files in production, which are inside a k8s pod, and it looks like the server file got compiled correctly, however, I am not sure if there is anywhere else I can look.. |
I'm not sure why reproducing this would be hard 🤔 just If that works fine then it's something in your app and we can talk about further debugging of your actual app, as then it's something specific to your setup. Just making sure we don't spend a lot of time investigating something together that isn't broken without verifying the core functionality is ok 😄 |
You are right. I did a bit of investigating and found it is not the build process... It looks like it has something to do with kubernetes or the ingress on my cluster. Im not sure what is happening though. This can be closed as it is not a bug. Sorry for the inconvenience and thanks for your help! |
Interesting, feel free to reach out on spectrum.chat/next-js / dm me if you're stuck 👍 |
Bug report
Describe the bug
assetPrefix is not being appended to _next file routes in production. Works when not in production.
next config:
server config:
Expected behavior
Append assetPrefix to _next files routes.
Screenshots
System information
Additional context
I have tried setting the assetPrefix unconditionally in my next config and again, it works in dev but not production.
The text was updated successfully, but these errors were encountered: