Prebuild JS Bundles for CDN
See original GitHub issueWould it be possible for next build
to prebuild all js bundles from pages and spit them out so they can be uploaded to the cdn? I can see next export
however I still want the server for the initial render but also want to leverage a CDN for my js assets.
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
Loading prebuilt webpack bundles at runtime - Stack Overflow
Let assume I have two separate bundles from two separate builds and I want to load modules from one bundle into another at...
Read more >@highlightjs/cdn-assets - npm
This package contains only the CDN build assets of highlight.js. ... the pre-built distributable highlight.js client-side assets via NPM.
Read more >prebuild | Yarn - Package Manager
A command line tool for easily making prebuilt binaries for multiple versions of Node.js, Node-API, Electron and NW.js on a specific platform.
Read more >Bundling JavaScript for Jekyll | CloudCannon
Your prebuild commands run in a Node environment, so you can install any npm packages you need. For example: npm install webpack npm...
Read more >Streaming Imports - Snowpack
Skypack (the CDN that powers pkg.snowpack.dev ) will always prefer a package JavaScript entrypoint over any source .svelte and .vue files. This works...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’re currently looking into uploading assets to a bucket as well, it seems like we’ll need to generate the mappings ourselves.
It doesn’t seem like using the application servers as the origin would work though because of the versioning requirements, especially if the application servers are behind a load balancer, and rolling deploys means that multiple versions can coexist.
Yes, I’m familiar with using a CDN as a proxy to your application servers.
But I think it is still useful to be able to get all the assets in static file form for the following reasons:
Warming CDN caches before deploying new versions (https://www.cdnplanet.com/guides/prefetch/)
Using many of the “turn-key” CDN solutions that are backed by cloud file storage (S3, Google Cloud Storage, etc) where the simplest configuration is to just point the CDN to a storage bucket.