File tree 1 file changed +8
-0
lines changed
packages/react-scripts/config
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const eslintFormatter = require('react-dev-utils/eslintFormatter');
19
19
const ModuleScopePlugin = require ( 'react-dev-utils/ModuleScopePlugin' ) ;
20
20
const getClientEnvironment = require ( './env' ) ;
21
21
const paths = require ( './paths' ) ;
22
+ const ManifestPlugin = require ( 'webpack-manifest-plugin' ) ;
22
23
23
24
// Webpack uses `publicPath` to determine where the app is being served from.
24
25
// In development, we always serve from the root. This makes config easier.
@@ -338,6 +339,13 @@ module.exports = {
338
339
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
339
340
// You can remove this if you don't use Moment.js:
340
341
new webpack . IgnorePlugin ( / ^ \. \/ l o c a l e $ / , / m o m e n t $ / ) ,
342
+ // Generate a manifest file which contains a mapping of all asset filenames
343
+ // to their corresponding output file so that tools can pick it up without
344
+ // having to parse `index.html`.
345
+ new ManifestPlugin ( {
346
+ fileName : 'asset-manifest.json' ,
347
+ publicPath : publicPath ,
348
+ } ) ,
341
349
] ,
342
350
// Some libraries import Node modules but don't use them in the browser.
343
351
// Tell Webpack to provide empty mocks for them so importing them works.
You can’t perform that action at this time.
0 commit comments