Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(devtools): fix __VUE_PROD_DEVTOOLS__ defined in cjs build (#1991) #1992

Merged
merged 6 commits into from Jun 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion rollup.config.js
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