File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
packages/react-scripts/config Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
2020const getCSSModuleLocalIdent = require ( 'react-dev-utils/getCSSModuleLocalIdent' ) ;
2121const getClientEnvironment = require ( './env' ) ;
2222const paths = require ( './paths' ) ;
23+ const ManifestPlugin = require ( 'webpack-manifest-plugin' ) ;
2324
2425// Webpack uses `publicPath` to determine where the app is being served from.
2526// In development, we always serve from the root. This makes config easier.
@@ -376,6 +377,13 @@ module.exports = {
376377 // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
377378 // You can remove this if you don't use Moment.js:
378379 new webpack . IgnorePlugin ( / ^ \. \/ l o c a l e $ / , / m o m e n t $ / ) ,
380+ // Generate a manifest file which contains a mapping of all asset filenames
381+ // to their corresponding output file so that tools can pick it up without
382+ // having to parse `index.html`.
383+ new ManifestPlugin ( {
384+ fileName : 'asset-manifest.json' ,
385+ publicPath : publicPath ,
386+ } ) ,
379387 ] ,
380388
381389 // Some libraries import Node modules but don't use them in the browser.
You can’t perform that action at this time.
0 commit comments