diff options
-rw-r--r-- | build/rollup.config.js | 8 | ||||
-rw-r--r-- | js/tests/integration/rollup.bundle.js | 3 | ||||
-rw-r--r-- | js/tests/karma.conf.js | 3 |
3 files changed, 11 insertions, 3 deletions
diff --git a/build/rollup.config.js b/build/rollup.config.js index 7f9c1c7e11..8cecec9aa2 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -28,7 +28,13 @@ if (BUNDLE) { // Remove last entry in external array to bundle Popper external.pop() delete globals['@popperjs/core'] - plugins.push(replace({ 'process.env.NODE_ENV': '"production"' }), nodeResolve()) + plugins.push( + replace({ + 'process.env.NODE_ENV': '"production"', + preventAssignment: true + }), + nodeResolve() + ) } const rollupConfig = { diff --git a/js/tests/integration/rollup.bundle.js b/js/tests/integration/rollup.bundle.js index 288f40961d..caddcab484 100644 --- a/js/tests/integration/rollup.bundle.js +++ b/js/tests/integration/rollup.bundle.js @@ -12,7 +12,8 @@ module.exports = { }, plugins: [ replace({ - 'process.env.NODE_ENV': '"production"' + 'process.env.NODE_ENV': '"production"', + preventAssignment: true }), nodeResolve(), babel({ diff --git a/js/tests/karma.conf.js b/js/tests/karma.conf.js index c13413449d..67b60f15ee 100644 --- a/js/tests/karma.conf.js +++ b/js/tests/karma.conf.js @@ -77,7 +77,8 @@ const conf = { rollupPreprocessor: { plugins: [ replace({ - 'process.env.NODE_ENV': '"dev"' + 'process.env.NODE_ENV': '"dev"', + preventAssignment: true }), istanbul({ exclude: [ |