]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
@rollup/plugin-replace: specify `preventAssignment: true` (#33329)
authorXhmikosR <xhmikosr@gmail.com>
Wed, 10 Mar 2021 16:47:42 +0000 (18:47 +0200)
committerGitHub <noreply@github.com>
Wed, 10 Mar 2021 16:47:42 +0000 (18:47 +0200)
This is to fix a warning since the option will be set to true in the next major version of the plugin

build/rollup.config.js
js/tests/integration/rollup.bundle.js
js/tests/karma.conf.js

index 7f9c1c7e11bf755fccc43a8df64931fe94b4bcfc..8cecec9aa24aefc3a77632f3489c68bec979e1b7 100644 (file)
@@ -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 = {
index 288f40961d42f98500d681225118cf1f1f54714b..caddcab484f3e9f09e253a510e58abe8d40fb8c5 100644 (file)
@@ -12,7 +12,8 @@ module.exports = {
   },
   plugins: [
     replace({
-      'process.env.NODE_ENV': '"production"'
+      'process.env.NODE_ENV': '"production"',
+      preventAssignment: true
     }),
     nodeResolve(),
     babel({
index c13413449d201616726a0dda7a31437fd92447d1..67b60f15ee484ed58eeaf1fea7786e2c9833ba54 100644 (file)
@@ -77,7 +77,8 @@ const conf = {
   rollupPreprocessor: {
     plugins: [
       replace({
-        'process.env.NODE_ENV': '"dev"'
+        'process.env.NODE_ENV': '"dev"',
+        preventAssignment: true
       }),
       istanbul({
         exclude: [