Add hash to the static JS/CSS

Closes #354
This commit is contained in:
Ildar Kamalov 2018-10-09 10:25:21 +03:00
parent 5718f55b9a
commit 814005021c
1 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,7 @@ const config = {
}, },
output: { output: {
path: PUBLIC_PATH, path: PUBLIC_PATH,
filename: '[name].js', filename: '[name].[chunkhash].js',
}, },
resolve: { resolve: {
modules: ['node_modules'], modules: ['node_modules'],
@ -94,10 +94,11 @@ const config = {
}), }),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
inject: true, inject: true,
cache: false,
template: HTML_PATH, template: HTML_PATH,
}), }),
new ExtractTextPlugin({ new ExtractTextPlugin({
filename: '[name].css', filename: '[name].[contenthash].css',
}), }),
], ],
}; };