Skip to content

Commit ab211d2

Browse files
committed
making sure the certain plugins section is only set for development
1 parent 9d8a832 commit ab211d2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,14 @@ module.exports = function(webpackEnv) {
414414
{ helpers: true },
415415
],
416416
],
417-
plugins: isEnvDevelopment && [
418-
[
419-
require.resolve('babel-plugin-bundled-import-meta'),
420-
{ importStyle: 'iife' },
421-
],
422-
],
417+
plugins: isEnvProduction
418+
? undefined
419+
: [
420+
[
421+
require.resolve('babel-plugin-bundled-import-meta'),
422+
{ importStyle: 'iife' },
423+
],
424+
],
423425
cacheDirectory: true,
424426
cacheCompression: isEnvProduction,
425427
// @remove-on-eject-begin

0 commit comments

Comments
 (0)