Skip to content

Commit

Permalink
fix(devtools): init devtools in production (#2906)
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin authored Jan 5, 2021
1 parent 143751d commit 4d9bcb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion packages/vue/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 4d9bcb7

Please sign in to comment.