NOOP,
hasOwn,
invokeArrayFns,
- isArray
+ isArray,
+ getGlobalThis
} from '@vue/shared'
import {
queueJob,
import {
devtoolsComponentAdded,
devtoolsComponentRemoved,
- devtoolsComponentUpdated
+ devtoolsComponentUpdated,
+ setDevtoolsHook
} from './devtools'
import { initFeatureFlags } from './featureFlags'
import { isAsyncWrapper } from './apiAsyncComponent'
initFeatureFlags()
}
+ if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+ const target = getGlobalThis()
+ target.__VUE__ = true
+ setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__)
+ }
+
const {
insert: hostInsert,
remove: hostRemove,
-import { setDevtoolsHook, initCustomFormatter } from '@vue/runtime-dom'
-import { getGlobalThis } from '@vue/shared'
+import { initCustomFormatter } from '@vue/runtime-dom'
export function initDev() {
- const target = getGlobalThis()
-
- target.__VUE__ = true
- setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__)
-
if (__BROWSER__) {
if (!__ESM_BUNDLER__) {
console.info(
import { isString, NOOP, generateCodeFrame, extend } from '@vue/shared'
import { InternalRenderFunction } from 'packages/runtime-core/src/component'
-if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+if (__DEV__) {
initDev()
}
import { initDev } from './dev'
import { warn } from '@vue/runtime-dom'
-if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+if (__DEV__) {
initDev()
}