Skip to content

Commit 2cd31bc

Browse files
committed
use explicit 'values' option with @rollup/plugin-replace
1 parent 4ac2a06 commit 2cd31bc

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

scripts/rollup/build.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -358,14 +358,16 @@ function getPlugins(
358358
// Turn __DEV__ and process.env checks into constants.
359359
replace({
360360
preventAssignment: true,
361-
__DEV__: isProduction ? 'false' : 'true',
362-
__PROFILE__: isProfiling || !isProduction ? 'true' : 'false',
363-
__UMD__: isUMDBundle ? 'true' : 'false',
364-
'process.env.NODE_ENV': isProduction ? "'production'" : "'development'",
365-
__EXPERIMENTAL__,
366-
// Enable forked reconciler.
367-
// NOTE: I did not put much thought into how to configure this.
368-
__VARIANT__: bundle.enableNewReconciler === true,
361+
values: {
362+
__DEV__: isProduction ? 'false' : 'true',
363+
__PROFILE__: isProfiling || !isProduction ? 'true' : 'false',
364+
__UMD__: isUMDBundle ? 'true' : 'false',
365+
'process.env.NODE_ENV': isProduction ? "'production'" : "'development'",
366+
__EXPERIMENTAL__,
367+
// Enable forked reconciler.
368+
// NOTE: I did not put much thought into how to configure this.
369+
__VARIANT__: bundle.enableNewReconciler === true,
370+
}
369371
}),
370372
// The CommonJS plugin *only* exists to pull "art" into "react-art".
371373
// I'm going to port "art" to ES modules to avoid this problem.

0 commit comments

Comments
 (0)