question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prebuild JS Bundles for CDN

See original GitHub issue

Would 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:closed
  • Created 6 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
unregisteredcommented, Dec 12, 2017

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.

4reactions
pcardunecommented, Dec 10, 2017

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:

  1. Warming CDN caches before deploying new versions (https://www.cdnplanet.com/guides/prefetch/)

  2. 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found