build: use contenthash in output filename for better caching
This commit is contained in:
parent
3aa50333dc
commit
f18817bf55
1 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,8 @@ const entry = {
|
|||
|
||||
const output = {
|
||||
path: path.resolve(__dirname, 'public'),
|
||||
filename: isDev ? '[name].bundle.js' : '[name].[chunkhash].js',
|
||||
// use contenthash instead of chunkhash to take advantage of caching
|
||||
filename: isDev ? '[name].bundle.js' : '[name].[contenthash].js',
|
||||
publicPath: ''
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue