Skip to content

Commit b3bff92

Browse files
committed
Put parent build hash in webpack output filenames
In order to better support a world where old build artifacts are available (which is necessary to support bundle.js splitting), collect all the webpack artifacts for the build into a single directory. Then we'll be able to clear out old builds after a few weeks, knowing they won't be in use any more.
1 parent 6b02bf8 commit b3bff92

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎webpack.config.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ module.exports = {
4040
},
4141
output: {
4242
path: path.join(__dirname, "webapp"),
43-
filename: "[name].[chunkhash].js",
43+
filename: "[hash]/[name].js",
44+
chunkFilename: "[hash]/[name].js",
4445
devtoolModuleFilenameTemplate: function(info) {
4546
// Reading input source maps gives only relative paths here for
4647
// everything. Until I figure out how to fix this, this is a
@@ -79,7 +80,7 @@ module.exports = {
7980
}),
8081

8182
new ExtractTextPlugin(
82-
"[name].[contenthash].css",
83+
"[hash]/[name].css",
8384
{
8485
allChunks: true
8586
}

0 commit comments

Comments
 (0)