fix(devtools): init devtools in production (#2906)

This commit is contained in:
underfin 2021-01-06 01:54:43 +08:00 committed by GitHub
parent 143751d2bc
commit 4d9bcb768d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,9 @@ import * as runtimeDom from '@vue/runtime-dom'
import { isString, NOOP, generateCodeFrame, extend } from '@vue/shared'
import { InternalRenderFunction } from 'packages/runtime-core/src/component'
__DEV__ && initDev()
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
initDev()
}
const compileCache: Record<string, RenderFunction> = Object.create(null)

View File

@ -3,7 +3,9 @@
import { initDev } from './dev'
import { warn } from '@vue/runtime-dom'
__DEV__ && initDev()
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
initDev()
}
export * from '@vue/runtime-dom'