Move list of files under files key in asset manifest (#6821)

This commit is contained in:
Ian Sutherland
2019-04-15 21:35:25 -06:00
committed by GitHub
parent 50c1884e62
commit 9048dd66a0

View File

@@ -598,6 +598,16 @@ module.exports = function(webpackEnv) {
new ManifestPlugin({
fileName: 'asset-manifest.json',
publicPath: publicPath,
generate: (seed, files) => {
const manifestFiles = files.reduce(function(manifest, file) {
manifest[file.name] = file.path;
return manifest;
}, seed);
return {
files: manifestFiles,
};
},
}),
// Moment.js is an extremely popular library that bundles large locale files
// by default due to how Webpack interprets its code. This is a practical