1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-06 06:07:33 +02:00

Fix the chunk name to pass browser's ad block

This commit is contained in:
Phuoc Nguyen
2020-02-05 21:53:05 +07:00
parent f1b71d4788
commit 3bcdc392bd

View File

@@ -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
// <script charset="utf-8" src="/[chunk-name].bundle.js"></script>