Interaction of `excludes` and `externals` options
new OfflinePlugin({
caches: {
main: [':rest:', '/app-shell.html'],
additional: [':externals:'],
optional: []
},
excludes: ['app-shell.html'],
externals: ['/app-shell.html']
})
This should exclude app-shell.html from build assets (assuming it's there by html-webpack-plugin) and add it back via externals option. This is how it works now, the only problem is that offline-plugin preserves and uses app-shell.html's build hash in this situation, but in shouldn't since the whole point of it is to get rid of that hash and treat app-shell.html as an external assets (always updates even with updateStrategy: changed and when actually app-shell.html file generated by html-webpack-plugin not changed). This is needed in case when app-shell.html is dynamically constructed on server depending on different server configuration or code, which isn't directly related to webpack build and hence cannot be reflected in it. Though, the app-shell.html template is still being generated by webpack.