Skip to content
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

Improve documentation of CDN asset paths #25531

Merged
merged 3 commits into from May 27, 2021
Merged

Conversation

thomasboyt
Copy link
Contributor

I've been working on adding CDN support to my Next.js app and was very surprised to find that the assetPrefix did not turn /_next/static/chunks/sha.js into $assetPrefix/chunks/sha.js, but instead $assetPrefix/_next/static/chunks/sha.js. Hopefully this change to the documentation will make this behavior much more clear to future users.

I've also incorporated a warning against uploading the entire .next folder to a CDN, as I saw @timneutkens note in a discussion here: #11622 (reply in thread)

Documentation / Examples

  • Make sure the linting passes

Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@kodiakhq kodiakhq bot merged commit 327488d into vercel:canary May 27, 2021
@thomasboyt thomasboyt deleted the patch-1 branch May 28, 2021 19:07
flybayer pushed a commit to blitz-js/next.js that referenced this pull request Jun 16, 2021
I've been working on adding CDN support to my Next.js app and was very surprised to find that the `assetPrefix` did not turn `/_next/static/chunks/sha.js` into `$assetPrefix/chunks/sha.js`, but instead `$assetPrefix/_next/static/chunks/sha.js`. Hopefully this change to the documentation will make this behavior much more clear to future users.

I've also incorporated a warning against uploading the entire `.next` folder to a CDN, as I saw @timneutkens note in a discussion here: vercel#11622 (reply in thread)

## Documentation / Examples

- [ ] Make sure the linting passes
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants