@@ -210,15 +210,11 @@ module.exports = function(webpackEnv) {
210210 pathinfo : isEnvDevelopment ,
211211 // There will be one main bundle, and one file per asynchronous chunk.
212212 // In development, it does not produce real files.
213- filename : isEnvProduction
214- ? 'static/js/[name].[contenthash:8].js'
215- : isEnvDevelopment && 'static/js/[name].[contenthash:8].js' , // wptheme modified... always use cache busting
213+ filename : 'static/js/bundle.js' , // wptheme modified... always use cache busting via the HtmlWebpackPlugin config, way below here
216214 // TODO: remove this when upgrading to webpack 5
217215 futureEmitAssets : true ,
218216 // There are also additional JS chunk files if you use code splitting.
219- chunkFilename : isEnvProduction
220- ? 'static/js/[name].[contenthash:8].chunk.js'
221- : isEnvDevelopment && 'static/js/[name].[contenthash:8].chunk.js' , // wptheme modified... always use cache busting
217+ chunkFilename : 'static/js/[name].chunk.js' , // wptheme modified... always use cache busting via the HtmlWebpackPlugin config, way below here
222218 // We inferred the "public path" (such as / or /my-project) from homepage.
223219 // We use "/" in development.
224220 publicPath : publicPath ,
@@ -596,14 +592,14 @@ module.exports = function(webpackEnv) {
596592 } ,
597593 plugins : [
598594 // Generates an `index.html` file with the <script> injected.
599- // wptheme -- added php support
600595 new HtmlWebpackPlugin (
601596 Object . assign (
602597 { } ,
603598 {
604- filename : 'index.php' ,
599+ filename : 'index.php' , // wptheme -- added php support
605600 inject : true ,
606601 template : paths . appHtml ,
602+ hash : true , // wptheme modified... always use cache busting
607603 } ,
608604 isEnvProduction
609605 ? {
@@ -665,8 +661,8 @@ module.exports = function(webpackEnv) {
665661 new MiniCssExtractPlugin ( {
666662 // Options similar to the same options in webpackOptions.output
667663 // both options are optional
668- filename : 'static/css/[name].[contenthash:8]. css' ,
669- chunkFilename : 'static/css/[name].[contenthash:8]. chunk.css' ,
664+ filename : 'static/css/[name].css' ,
665+ chunkFilename : 'static/css/[name].chunk.css' ,
670666 } ) ,
671667 // Generate a manifest file which contains a mapping of all asset filenames
672668 // to their corresponding output file so that tools can pick it up without
0 commit comments