diff --git a/webpack.config.js b/webpack.config.js index 67caec60e92..e3eb57abcf2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -25,6 +25,9 @@ const htmlWebpackPluginCommon = { APP_NAME }; +// Change this number to bypass all old HTTP caches +const CACHE_EPOCH = 2; + const base = { mode: process.env.NODE_ENV === 'production' ? 'production' : 'development', devtool: process.env.SOURCEMAP || (process.env.NODE_ENV === 'production' ? false : 'cheap-module-source-map'), @@ -47,8 +50,8 @@ const base = { }, output: { library: 'GUI', - filename: process.env.NODE_ENV === 'production' ? 'js/[name].[contenthash].js' : 'js/[name].js', - chunkFilename: process.env.NODE_ENV === 'production' ? 'js/[name].[contenthash].js' : 'js/[name].js', + filename: process.env.NODE_ENV === 'production' ? `js-${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js', + chunkFilename: process.env.NODE_ENV === 'production' ? `js-${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js', publicPath: root }, resolve: {