Skip to content

Commit 9048dd6

Browse files
authored
Move list of files under files key in asset manifest (#6821)
1 parent 50c1884 commit 9048dd6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/react-scripts/config/webpack.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,16 @@ module.exports = function(webpackEnv) {
598598
new ManifestPlugin({
599599
fileName: 'asset-manifest.json',
600600
publicPath: publicPath,
601+
generate: (seed, files) => {
602+
const manifestFiles = files.reduce(function(manifest, file) {
603+
manifest[file.name] = file.path;
604+
return manifest;
605+
}, seed);
606+
607+
return {
608+
files: manifestFiles,
609+
};
610+
},
601611
}),
602612
// Moment.js is an extremely popular library that bundles large locale files
603613
// by default due to how Webpack interprets its code. This is a practical

0 commit comments

Comments
 (0)