Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
Use chunkhash/hash (contenthash added in webpack 4)
Browse files Browse the repository at this point in the history
  • Loading branch information
threehams committed Nov 12, 2018
1 parent efcb98f commit 8781da5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/gluestick/src/config/webpack/webpack.config.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ module.exports = (
output: {
path: outputPath, // filesystem path for static files
publicPath: `/${publicPath}/`.replace(/\/\//g, '/'), // network path for static files
filename: '[name].[contenthash].js', // file name pattern for entry scripts
chunkFilename: '[name].[contenthash].js', // file name pattern for chunk scripts
filename: '[name].[chunkhash].js', // file name pattern for entry scripts
chunkFilename: '[name].[chunkhash].js', // file name pattern for chunk scripts
},
module: {
rules: [
Expand Down Expand Up @@ -110,7 +110,7 @@ module.exports = (
{
loader: 'file-loader',
options: {
name: '[name]-[contenthash].[ext]',
name: '[name]-[hash].[ext]',
},
},
{
Expand All @@ -126,7 +126,7 @@ module.exports = (
{
loader: 'file-loader',
options: {
name: '[name]-[contenthash].[ext]',
name: '[name]-[hash].[ext]',
},
},
],
Expand All @@ -144,7 +144,7 @@ module.exports = (
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
filename: `vendor${process.env.NODE_ENV === 'production'
? '-[contenthash]'
? '-[chunkhash]'
: ''}.bundle.js`,
}),
].filter(Boolean),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ module.exports = (
{
loader: 'file-loader',
options: {
name: '[name]-[contenthash].[ext]',
name: '[name]-[hash].[ext]',
emitFile: false,
},
},
Expand All @@ -139,7 +139,7 @@ module.exports = (
{
loader: 'file-loader',
options: {
name: '[name]-[contenthash].[ext]',
name: '[name]-[hash].[ext]',
emitFile: false,
},
},
Expand Down

0 comments on commit 8781da5

Please sign in to comment.