mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-07 14:46:38 +02:00
Fix the chunk name to pass browser's ad block
This commit is contained in:
@@ -14,8 +14,7 @@ const plugins = [
|
|||||||
filename: './index.html',
|
filename: './index.html',
|
||||||
}),
|
}),
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
// filename: '[name].[contenthash].css',
|
filename: '[name].[contenthash].css',
|
||||||
filename: '[name].css',
|
|
||||||
ignoreOrder: false, // Enable to remove warnings about conflicting order
|
ignoreOrder: false, // Enable to remove warnings about conflicting order
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
@@ -35,8 +34,10 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist'),
|
path: path.join(__dirname, 'dist'),
|
||||||
// filename: '[name].[contenthash].js',
|
filename: '[name].[contenthash].js',
|
||||||
filename: '[name].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
|
// It's very important
|
||||||
// All the chunk generated by webpack then will be loaded such as
|
// All the chunk generated by webpack then will be loaded such as
|
||||||
// <script charset="utf-8" src="/[chunk-name].bundle.js"></script>
|
// <script charset="utf-8" src="/[chunk-name].bundle.js"></script>
|
||||||
|
Reference in New Issue
Block a user