Skip to content

Commit a2ae8a7

Browse files
swashcapiansu
authored andcommitted
Remove Object.assign from MiniCssExtractPlugin options (#6854)
1 parent c34c743 commit a2ae8a7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ module.exports = function(webpackEnv) {
8484
isEnvDevelopment && require.resolve('style-loader'),
8585
isEnvProduction && {
8686
loader: MiniCssExtractPlugin.loader,
87-
options: Object.assign(
88-
{},
89-
shouldUseRelativeAssetPaths ? { publicPath: '../../' } : undefined
90-
),
87+
options: shouldUseRelativeAssetPaths ? { publicPath: '../../' } : {},
9188
},
9289
{
9390
loader: require.resolve('css-loader'),
@@ -269,7 +266,9 @@ module.exports = function(webpackEnv) {
269266
// We placed these paths second because we want `node_modules` to "win"
270267
// if there are any conflicts. This matches Node resolution mechanism.
271268
// https://github.com/facebook/create-react-app/issues/253
272-
modules: ['node_modules', paths.appNodeModules].concat(modules.additionalModulePaths || []),
269+
modules: ['node_modules', paths.appNodeModules].concat(
270+
modules.additionalModulePaths || []
271+
),
273272
// These are the reasonable defaults supported by the Node ecosystem.
274273
// We also include JSX as a common component filename extension to support
275274
// some tools, although we do not recommend using it, see:

0 commit comments

Comments
 (0)