Skip to content

Commit

Permalink
Move list of files under files key in asset manifest (#6821)
Browse files Browse the repository at this point in the history
  • Loading branch information
iansu authored Apr 16, 2019
1 parent 50c1884 commit 9048dd6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9048dd6

Please sign in to comment.