Skip to content

Commit

Permalink
fix(build): cjs build failing due to __VUE_PROD_DEVTOOLS__ defined (#…
Browse files Browse the repository at this point in the history
…1991) (#1992)

fix #1991 

Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
  • Loading branch information
cokemine and kiaking authored Jun 1, 2021
1 parent 94d433a commit 7151622
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function createEntries() {
function createEntry(config) {
const isGlobalBuild = config.format === 'iife'
const isBundlerBuild = config.format !== 'iife' && !config.browser
const isBundlerESMBuild = config.format === 'es' && !config.browser

const c = {
external: ['vue'],
Expand Down Expand Up @@ -61,7 +62,9 @@ function createEntry(config) {
__DEV__: isBundlerBuild
? `(process.env.NODE_ENV !== 'production')`
: config.env !== 'production',
__VUE_PROD_DEVTOOLS__: isBundlerBuild ? '__VUE_PROD_DEVTOOLS__' : 'false'
__VUE_PROD_DEVTOOLS__: isBundlerESMBuild
? '__VUE_PROD_DEVTOOLS__'
: 'false'
}))

if (config.transpile !== false) {
Expand Down

0 comments on commit 7151622

Please sign in to comment.