cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced JavaScript bundling conflicting with CDN for static content

Highlighted

Advanced JavaScript bundling conflicting with CDN for static content

Enabling CDN for static subdomain results in some KnockOut JS dependencies(.html) adding .js extension on top of .html.

 

We recently setup CDN for the static sub-domain on the Magento 2 store. This appears not to go well with the advanced JS bundling. Why does enabling CDN for static subdomain result in some KnockOut JS dependencies adding .js extension. This happens only with those dependencies whose original extension is .html.

 

Below is a sample dependency showing the additional .js extension following .html. This happens only when CDN is enabled for static content. This tax.html.js in the sample below was originally tax.html when the CDN was disabled.

 

require.js:274 GET https://s.mymagento2sitedomain.com/version1592907500/frontend/Perfectmakeupmirrors/argento-luxury-cu... net::ERR_ABORTED 400