fix: init devtools after feature flag checks
This commit is contained in:
@@ -36,7 +36,8 @@ import {
|
||||
NOOP,
|
||||
hasOwn,
|
||||
invokeArrayFns,
|
||||
isArray
|
||||
isArray,
|
||||
getGlobalThis
|
||||
} from '@vue/shared'
|
||||
import {
|
||||
queueJob,
|
||||
@@ -75,7 +76,8 @@ import { ComponentPublicInstance } from './componentPublicInstance'
|
||||
import {
|
||||
devtoolsComponentAdded,
|
||||
devtoolsComponentRemoved,
|
||||
devtoolsComponentUpdated
|
||||
devtoolsComponentUpdated,
|
||||
setDevtoolsHook
|
||||
} from './devtools'
|
||||
import { initFeatureFlags } from './featureFlags'
|
||||
import { isAsyncWrapper } from './apiAsyncComponent'
|
||||
@@ -430,6 +432,12 @@ function baseCreateRenderer(
|
||||
initFeatureFlags()
|
||||
}
|
||||
|
||||
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
|
||||
const target = getGlobalThis()
|
||||
target.__VUE__ = true
|
||||
setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__)
|
||||
}
|
||||
|
||||
const {
|
||||
insert: hostInsert,
|
||||
remove: hostRemove,
|
||||
|
||||
Reference in New Issue
Block a user