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

Merge pull request #124 from phuoc-ng/fix-ad-block

Fix the chunk name to pass browser's ad block
This commit is contained in:
phuoc-ng
2020-02-05 21:57:47 +07:00
committed by GitHub

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>