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');
20
20
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
21
21
const getClientEnvironment = require('./env');
22
22
const paths = require('./paths');
23
+ const ManifestPlugin = require('webpack-manifest-plugin');
23
24
24
25
// Webpack uses `publicPath` to determine where the app is being served from.
25
26
// In development, we always serve from the root. This makes config easier.
@@ -376,6 +377,13 @@ module.exports = {
376
377
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
377
378
// You can remove this if you don't use Moment.js:
378
379
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
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
+ }),
379
387
],
380
388
381
389
// 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