mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-07 13:15:52 +08:00
Move list of files under files key in asset manifest (#6821)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user