Webpack 2 Asynchronous Code Conversion CDN

Is there any way to reset async chunk configuration on webpack 2?

This is what I want to have:

Like Fallback JS Function // Include `jQuery`. "jQuery": { // The URLs to load `jQuery`. "urls": [ "//.....some-bad-cdn...../.....FAIL-ON-PURPOSE.....", "//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min", "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min" ] },

I read the Code Splitting - Async documentation . There are no options.

The way I got to the solution is to run another jsonp request on a new url inside the require.ensure error callback , but I cannot get the chunk url from the error event.

======== 12 ========

, . , webpack manifest.js( ).

+4

Source: https://habr.com/ru/post/1677154/


All Articles