Skip to content

Commit f17914c

Browse files
committed
enable manifest plugin on dev
1 parent 43fbf0f commit f17914c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const eslintFormatter = require('react-dev-utils/eslintFormatter');
1919
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
2020
const getClientEnvironment = require('./env');
2121
const paths = require('./paths');
22+
const ManifestPlugin = require('webpack-manifest-plugin');
2223

2324
// Webpack uses `publicPath` to determine where the app is being served from.
2425
// In development, we always serve from the root. This makes config easier.
@@ -338,6 +339,13 @@ module.exports = {
338339
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
339340
// You can remove this if you don't use Moment.js:
340341
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
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+
}),
341349
],
342350
// Some libraries import Node modules but don't use them in the browser.
343351
// Tell Webpack to provide empty mocks for them so importing them works.

0 commit comments

Comments
 (0)