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.
pull/2961/head
Richard van der Hoff 2017-01-16 18:01:25 +00:00
parent 6b02bf8e8c
commit b3bff92cc2
1 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,8 @@ module.exports = {
}, },
output: { output: {
path: path.join(__dirname, "webapp"), path: path.join(__dirname, "webapp"),
filename: "[name].[chunkhash].js", filename: "[hash]/[name].js",
chunkFilename: "[hash]/[name].js",
devtoolModuleFilenameTemplate: function(info) { devtoolModuleFilenameTemplate: function(info) {
// Reading input source maps gives only relative paths here for // Reading input source maps gives only relative paths here for
// everything. Until I figure out how to fix this, this is a // everything. Until I figure out how to fix this, this is a
@ -79,7 +80,7 @@ module.exports = {
}), }),
new ExtractTextPlugin( new ExtractTextPlugin(
"[name].[contenthash].css", "[hash]/[name].css",
{ {
allChunks: true allChunks: true
} }