}
}
+let queued = false
export function setDevtoolsHook(hook: DevtoolsHook, target: any): void {
+ if (devtoolsNotInstalled || queued) {
+ return
+ }
devtools = hook
if (devtools) {
devtools.enabled = true
// eslint-disable-next-line no-restricted-syntax
!window.navigator?.userAgent?.includes('jsdom')
) {
+ queued = true
const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [])
replay.push((newHook: DevtoolsHook) => {
import { getGlobalThis } from '@vue/shared'
+let initialized = false
+
/**
* This is only called in esm-bundler builds.
* It is called when a renderer is created, in `baseCreateRenderer` so that
* importing runtime-core is side-effects free.
*/
export function initFeatureFlags(): void {
+ if (initialized) return
+
const needWarn = []
if (typeof __FEATURE_OPTIONS_API__ !== 'boolean') {
`For more details, see https://link.vuejs.org/feature-flags.`,
)
}
+
+ initialized = true
}
* @internal
*/
export { startMeasure, endMeasure } from './profiling'
+/**
+ * @internal
+ */
+export { initFeatureFlags } from './featureFlags'
type CreateAppFunction,
createAppAPI,
flushOnAppMount,
+ initFeatureFlags,
normalizeContainer,
+ setDevtoolsHook,
warn,
} from '@vue/runtime-dom'
import type { RawProps } from './componentProps'
+import { getGlobalThis } from '@vue/shared'
let _createApp: CreateAppFunction<ParentNode, VaporComponent>
comp,
props,
) => {
+ // compile-time feature flags check
+ if (__ESM_BUNDLER__ && !__TEST__) {
+ initFeatureFlags()
+ }
+
+ const target = getGlobalThis()
+ target.__VUE__ = true
+ if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+ setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target)
+ }
+
if (!_createApp) _createApp = createAppAPI(mountApp, unmountApp, getExposed)
const app = _createApp(comp, props)
__FEATURE_SUSPENSE__: `true`,
__FEATURE_OPTIONS_API__: `true`,
__FEATURE_PROD_DEVTOOLS__: `false`,
+ __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__: `false`,
},
}
},