Fix webpack config for bundle caching
This commit is contained in:
parent
10c07df84c
commit
4bb8102ca7
1 changed files with 5 additions and 2 deletions
|
@ -33,7 +33,9 @@ module.exports = {
|
|||
new CleanWebpackPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: 'index.html'
|
||||
template: 'index.html',
|
||||
// Append file hashes to bundle urls for cache busting
|
||||
hash: true
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
|
@ -75,7 +77,8 @@ module.exports = {
|
|||
})
|
||||
],
|
||||
output: {
|
||||
filename: '[name].[contenthash].bundle.js',
|
||||
filename: '[name].bundle.js',
|
||||
chunkFilename: '[name].[contenthash].chunk.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
publicPath: ''
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue