diff --git a/webpack.config.js b/webpack.config.js index 5a7eeae..7ec1049 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -14,8 +14,7 @@ const plugins = [ filename: './index.html', }), new MiniCssExtractPlugin({ - // filename: '[name].[contenthash].css', - filename: '[name].css', + filename: '[name].[contenthash].css', ignoreOrder: false, // Enable to remove warnings about conflicting order }), ]; @@ -35,8 +34,10 @@ module.exports = { }, output: { path: path.join(__dirname, 'dist'), - // filename: '[name].[contenthash].js', - filename: '[name].js', + filename: '[name].[contenthash].js', + // If user browser enables ad blocking, then the pattern likes `Cookie banner` can't be loaded + // In order to fix that, we remove the `[name]` from the bundled output + chunkFilename: '[contenthash].js', // It's very important // All the chunk generated by webpack then will be loaded such as //