From: Eduardo San Martin Morote Date: Fri, 19 Aug 2022 13:49:50 +0000 (+0200) Subject: fix(build): better prod devtools guard X-Git-Tag: pinia@2.0.20~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=946813774927023f081c32a45676b0454e3a6a2e;p=thirdparty%2Fvuejs%2Fpinia.git fix(build): better prod devtools guard --- diff --git a/rollup.config.js b/rollup.config.js index cc227673..0b300fbb 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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),