A webpack plugin to retry loading of async chunks that failed to load
// webpack.config.js
const { RetryChunkLoadPlugin } = require('webpack-retry-chunk-load-plugin');
plugins: [
new RetryChunkLoadPlugin({
// optional stringified function to get the cache busting query string appended to the script src
// if not set will default to appending the string `?cache-bust=true`
cacheBust: `function() {
return Date.now();
}`
})
];
To use this with the angular CLI you can use the fantastic angular-builders
project to extend the built in webpack config
MIT