Skip to content

Commit

Permalink
Put parent build hash in webpack output filenames
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
richvdh committed Jan 16, 2017
1 parent 6b02bf8 commit b3bff92
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ module.exports = {
},
output: {
path: path.join(__dirname, "webapp"),
filename: "[name].[chunkhash].js",
filename: "[hash]/[name].js",
chunkFilename: "[hash]/[name].js",
devtoolModuleFilenameTemplate: function(info) {
// Reading input source maps gives only relative paths here for
// everything. Until I figure out how to fix this, this is a
Expand Down Expand Up @@ -79,7 +80,7 @@ module.exports = {
}),

new ExtractTextPlugin(
"[name].[contenthash].css",
"[hash]/[name].css",
{
allChunks: true
}
Expand Down

0 comments on commit b3bff92

Please sign in to comment.