Skip to content

Commit 7151622

Browse files
cokeminekiaking
andauthored
fix(build): cjs build failing due to __VUE_PROD_DEVTOOLS__ defined (#1991) (#1992)
fix #1991 Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
1 parent 94d433a commit 7151622

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rollup.config.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function createEntries() {
2727
function createEntry(config) {
2828
const isGlobalBuild = config.format === 'iife'
2929
const isBundlerBuild = config.format !== 'iife' && !config.browser
30+
const isBundlerESMBuild = config.format === 'es' && !config.browser
3031

3132
const c = {
3233
external: ['vue'],
@@ -61,7 +62,9 @@ function createEntry(config) {
6162
__DEV__: isBundlerBuild
6263
? `(process.env.NODE_ENV !== 'production')`
6364
: config.env !== 'production',
64-
__VUE_PROD_DEVTOOLS__: isBundlerBuild ? '__VUE_PROD_DEVTOOLS__' : 'false'
65+
__VUE_PROD_DEVTOOLS__: isBundlerESMBuild
66+
? '__VUE_PROD_DEVTOOLS__'
67+
: 'false'
6568
}))
6669

6770
if (config.transpile !== false) {

0 commit comments

Comments
 (0)