]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
fix(build): better prod devtools guard
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 19 Aug 2022 13:49:50 +0000 (15:49 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 19 Aug 2022 13:49:50 +0000 (15:49 +0200)
rollup.config.js

index cc2276737d76bc820cbc4fcf88d238c8dd68755d..0b300fbb740c3354bdb8a1b212c130ff072e295a 100644 (file)
@@ -178,7 +178,7 @@ function createReplacePlugin(
         ? `(process.env.NODE_ENV === 'test')`
         : 'false',
     __FEATURE_PROD_DEVTOOLS__: isBundlerESMBuild
-      ? `__VUE_PROD_DEVTOOLS__`
+      ? `(typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)`
       : 'false',
     // If the build is expected to run directly in the browser (global / esm builds)
     __BROWSER__: JSON.stringify(isRawESMBuild),