CDN Support
See original GitHub issueIs there any hope of this ever working with CDNs? Sometimes it seems the entire webpack ecosystem is built in a world where CDNs aren’t a thing…
If the generated index.html
has absolute links for use with a CDN, say, the HTML is served from www.example.com
and the assets are served from static.example.com
, pre-rendering will fail because the assets are not actually on the CDN yet during the build process. You’d have to pre-render after deploying, so you’d end up with a two-stage deployment. Perhaps a separate build target that uses relative URLs instead of the CDN ones so that everything is available during build?
Is there a solution I’m overlooking?
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
What is a CDN? | How do CDNs work? - Cloudflare
A content delivery network (CDN) refers to a geographically distributed group of servers that work together to provide fast delivery of Internet content....
Read more >What is a CDN (Content Delivery Network)? - Akamai
A content delivery network (CDN) is a group of geographically distributed servers that speed up the delivery of web content by bringing it...
Read more >What is a CDN? - CDN Explained - AWS
CDN can stand for content delivery network or content distribution network. When a user visits a website, data from that website's server has...
Read more >Content delivery network - Wikipedia
A content delivery network, or content distribution network (CDN), is a geographically distributed network of proxy servers and their data centers.
Read more >Cloud CDN: Content Delivery Network - Google Cloud
Supports hybrid and multicloud architecture. Cloud CDN enables customers to deliver content hosted on-premises or in another cloud over Google's high- ...
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
A 2-step deploy is not uncommon.
At some point, we all have to write some code instead of assuming that there will be a plugin (or option for said plugin) to handle every project need.
Why not create a new task like
npm run prebuild
that creates all of your assets and uploads them tostatic.example.com
as a prerequisite tonpm run build
?package.json (hypothetical snippet)
@krestaino You can look at this. prerender-cdn-demo