"build-dts": "tsc -p tsconfig.build.json && rollup -c rollup.dts.config.js",
"clean": "rimraf packages/*/dist temp .eslintcache",
"size": "run-s \"size-*\" && tsx scripts/usage-size.ts",
- "size-global": "node scripts/build.js vue runtime-dom -f global -p --size",
- "size-esm-runtime": "node scripts/build.js vue -f esm-bundler-runtime",
- "size-esm": "node scripts/build.js runtime-dom runtime-core reactivity shared -f esm-bundler",
+ "size-global": "node scripts/build.js vue vue-vapor runtime-dom runtime-vapor -f global -p --size",
+ "size-esm-runtime": "node scripts/build.js vue vue-vapor -f esm-bundler-runtime",
+ "size-esm": "node scripts/build.js runtime-dom runtime-vapor runtime-core reactivity shared -f esm-bundler",
"check": "tsc --incremental --noEmit",
- "lint": "eslint --cache --ext .ts packages/*/{src,__tests__}/**.ts",
- "format": "prettier --write --cache \"**/*.[tj]s?(x)\"",
- "format-check": "prettier --check --cache \"**/*.[tj]s?(x)\"",
+ "lint": "eslint --cache --ext .js,.ts,.tsx . --ignore-path .gitignore",
+ "format": "prettier --write --cache .",
+ "format-check": "prettier --check --cache .",
"test": "vitest",
"test-unit": "vitest -c vitest.unit.config.ts",
"test-e2e": "node scripts/build.js vue -f global -d && vitest -c vitest.e2e.config.ts",
map?: RawSourceMap
}
-enum NewlineType {
+export enum NewlineType {
+ /** Start with `\n` */
Start = 0,
+ /** Ends with `\n` */
End = -1,
+ /** No `\n` included */
None = -2,
- Unknown = -3
+ /** Don't know, calc it */
+ Unknown = -3,
}
export interface CodegenContext
createStructuralDirectiveTransform,
type NodeTransform,
type StructuralDirectiveTransform,
- type DirectiveTransform
+ type DirectiveTransform,
} from './transform'
-export { generate, type CodegenContext, type CodegenResult } from './codegen'
+export {
+ generate,
+ NewlineType,
+ type CodegenContext,
- type CodegenResult
++ type CodegenResult,
+} from './codegen'
export {
ErrorCodes,
errorMessages,
createCompilerError,
+ defaultOnError,
+ defaultOnWarn,
type CoreCompilerError,
- type CompilerError
+ type CompilerError,
} from './errors'
export * from './ast'
checkCompatEnabled,
warnDeprecation,
CompilerDeprecationTypes,
- type CompilerCompatOptions
++ type CompilerCompatOptions,
} from './compat/compatConfig'
}
export const isMemberExpressionNode = __BROWSER__
- ? (NOOP as any as (path: string, context: TransformContext) => boolean)
- : (path: string, context: TransformContext): boolean => {
+ ? (NOOP as any as (
+ path: string,
- options: Pick<TransformContext, 'expressionPlugins'>
++ options: Pick<TransformContext, 'expressionPlugins'>,
+ ) => boolean)
+ : (
+ path: string,
- options: Pick<TransformContext, 'expressionPlugins'>
++ options: Pick<TransformContext, 'expressionPlugins'>,
+ ): boolean => {
try {
let ret: Expression = parseExpression(path, {
- plugins: options.expressionPlugins
- plugins: context.expressionPlugins,
++ plugins: options.expressionPlugins,
})
ret = unwrapTSNode(ret) as Expression
return (
[DOMErrorCodes.X_V_SHOW_NO_EXPRESSION]: `v-show is missing expression.`,
[DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN]: `<Transition> expects exactly one child element or component.`,
[DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
- [DOMErrorCodes.__EXTEND_POINT__]: ``
+
+ // just to fulfill types
++ [DOMErrorCodes.__EXTEND_POINT__]: ``,
}
export {
createDOMCompilerError,
DOMErrorCodes,
- DOMErrorMessages
+ DOMErrorMessages,
} from './errors'
+export { resolveModifiers } from './transforms/vOn'
export * from '@vue/compiler-core'
import {
- type SimpleExpressionNode,
+ CompilerDeprecationTypes,
+ type DirectiveTransform,
+ type ExpressionNode,
+ NodeTypes,
+ type SourceLocation,
+ type TransformContext,
transformOn as baseTransform,
- DirectiveTransform,
- createObjectProperty,
+ checkCompatEnabled,
createCallExpression,
- createSimpleExpression,
- NodeTypes,
createCompoundExpression,
- ExpressionNode,
+ createObjectProperty,
+ createSimpleExpression,
isStaticExp,
- CompilerDeprecationTypes,
- TransformContext,
- SourceLocation,
- checkCompatEnabled
} from '@vue/compiler-core'
- import { V_ON_WITH_MODIFIERS, V_ON_WITH_KEYS } from '../runtimeHelpers'
- import { makeMap, capitalize, isString } from '@vue/shared'
+ import { V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS } from '../runtimeHelpers'
-import { capitalize, makeMap } from '@vue/shared'
++import { capitalize, isString, makeMap } from '@vue/shared'
const isEventOptionModifier = /*#__PURE__*/ makeMap(`passive,once,capture`)
const isNonKeyModifier = /*#__PURE__*/ makeMap(
const maybeKeyModifier = /*#__PURE__*/ makeMap('left,right')
const isKeyboardEvent = /*#__PURE__*/ makeMap(
`onkeyup,onkeydown,onkeypress`,
- true
+ true,
)
-const resolveModifiers = (
- key: ExpressionNode,
+export const resolveModifiers = (
+ key: ExpressionNode | string,
modifiers: string[],
- context: TransformContext,
+ context: TransformContext | null,
- loc: SourceLocation
+ loc: SourceLocation,
) => {
const keyModifiers = []
const nonKeyModifiers = []
Fragment,
Text,
cloneVNode,
+ createBlock,
+ createVNode,
+ isBlockTreeEnabled,
mergeProps,
normalizeVNode,
+ openBlock,
transformVNodeArgs,
- isBlockTreeEnabled
} from '../src/vnode'
- import { ShapeFlags, PatchFlags, Data } from '@vue/shared'
- import { h, reactive, isReactive, setBlockTracking, ref, withCtx } from '../src'
-import type { Data } from '../src/component'
-import { PatchFlags, ShapeFlags } from '@vue/shared'
++import { type Data, PatchFlags, ShapeFlags } from '@vue/shared'
+ import { h, isReactive, reactive, ref, setBlockTracking, withCtx } from '../src'
import { createApp, nodeOps, serializeInner } from '@vue/runtime-test'
import { setCurrentRenderingInstance } from '../src/componentRenderContext'
import {
- ConcreteComponent,
+ type Component,
+ type ComponentInternalInstance,
+ type ConcreteComponent,
- type Data,
+ getExposeProxy,
validateComponentName,
- Component,
- ComponentInternalInstance,
- getExposeProxy
} from './component'
- import {
+ import type {
ComponentOptions,
MergedComponentOptions,
- RuntimeCompilerOptions
+ RuntimeCompilerOptions,
} from './componentOptions'
- import {
+ import type {
ComponentCustomProperties,
- ComponentPublicInstance
+ ComponentPublicInstance,
} from './componentPublicInstance'
- import { Directive, validateDirectiveName } from './directives'
- import { ElementNamespace, RootRenderFunction } from './renderer'
- import { InjectionKey } from './apiInject'
+ import { type Directive, validateDirectiveName } from './directives'
+ import type { ElementNamespace, RootRenderFunction } from './renderer'
+ import type { InjectionKey } from './apiInject'
import { warn } from './warning'
- import { createVNode, cloneVNode, VNode } from './vnode'
- import { RootHydrateFunction } from './hydration'
+ import { type VNode, cloneVNode, createVNode } from './vnode'
+ import type { RootHydrateFunction } from './hydration'
import { devtoolsInitApp, devtoolsUnmountApp } from './devtools'
- import { isFunction, NO, isObject, extend, Data } from '@vue/shared'
-import { NO, extend, isFunction, isObject } from '@vue/shared'
++import { type Data, NO, extend, isFunction, isObject } from '@vue/shared'
import { version } from '.'
import { installAppCompatProperties } from './compat/global'
- import { NormalizedPropsOptions } from './componentProps'
- import { ObjectEmitsOptions } from './componentEmits'
- import { DefineComponent } from './apiDefineComponent'
+ import type { NormalizedPropsOptions } from './componentProps'
+ import type { ObjectEmitsOptions } from './componentEmits'
+ import type { DefineComponent } from './apiDefineComponent'
export interface App<HostElement = any> {
version: string
- import { isArray, Data } from '@vue/shared'
-import { isArray } from '@vue/shared'
++import { type Data, isArray } from '@vue/shared'
import { inject } from '../apiInject'
- import { ComponentInternalInstance } from '../component'
- import { ComponentOptions, resolveMergedOptions } from '../componentOptions'
-import type { ComponentInternalInstance, Data } from '../component'
++import type { ComponentInternalInstance } from '../component'
+ import {
+ type ComponentOptions,
+ resolveMergedOptions,
+ } from '../componentOptions'
import { DeprecationTypes, warnDeprecation } from './compatConfig'
export function createPropsDefaultThis(
import {
++ type Data,
+ ShapeFlags,
extend,
hyphenate,
isArray,
Component,
ComponentInternalInstance,
ComponentOptions,
- InternalRenderFunction
- Data,
+ InternalRenderFunction,
} from '../component'
import { currentRenderingInstance } from '../componentRenderContext'
- import { DirectiveArguments, withDirectives } from '../directives'
+ import { type DirectiveArguments, withDirectives } from '../directives'
import {
resolveDirective,
- resolveDynamicComponent
+ resolveDynamicComponent,
} from '../helpers/resolveAssets'
import {
Comment,
} from './componentSlots'
import { warn } from './warning'
import { ErrorCodes, callWithErrorHandling, handleError } from './errorHandling'
- import { AppContext, createAppContext, AppConfig } from './apiCreateApp'
- import { Directive, validateDirectiveName } from './directives'
import {
+ type AppConfig,
+ type AppContext,
+ createAppContext,
+ } from './apiCreateApp'
+ import { type Directive, validateDirectiveName } from './directives'
+ import {
+ type ComponentOptions,
+ type ComputedOptions,
+ type MethodOptions,
applyOptions,
- ComponentOptions,
- ComputedOptions,
- MethodOptions,
- resolveMergedOptions
+ resolveMergedOptions,
} from './componentOptions'
import {
- EmitsOptions,
- ObjectEmitsOptions,
- EmitFn,
+ type EmitFn,
+ type EmitsOptions,
+ type EmitsToProps,
+ type ObjectEmitsOptions,
+ type ShortEmitsToObject,
emit,
normalizeEmitsOptions,
- EmitsToProps,
- ShortEmitsToObject
} from './componentEmits'
import {
++ type Data,
EMPTY_OBJ,
- isArray,
- isFunction,
- NOOP,
- isObject,
+ type IfAny,
NO,
- makeMap,
- isPromise,
+ NOOP,
ShapeFlags,
extend,
getGlobalThis,
- IfAny,
- Data
+ isArray,
+ isFunction,
+ isObject,
+ isPromise,
+ makeMap,
} from '@vue/shared'
- import { SuspenseBoundary } from './components/Suspense'
- import { CompilerOptions } from '@vue/compiler-core'
+ import type { SuspenseBoundary } from './components/Suspense'
+ import type { CompilerOptions } from '@vue/compiler-core'
import { markAttrsAccessed } from './componentRenderUtils'
import { currentRenderingInstance } from './componentRenderContext'
- import { startMeasure, endMeasure } from './profiling'
+ import { endMeasure, startMeasure } from './profiling'
import { convertLegacyRenderFn } from './compat/renderFn'
import {
- CompatConfig,
+ type CompatConfig,
globalCompatConfig,
- validateCompatConfig
+ validateCompatConfig,
} from './compat/compatConfig'
- import { SchedulerJob } from './scheduler'
- import { LifecycleHooks } from './enums'
+ import type { SchedulerJob } from './scheduler'
+ import type { LifecycleHooks } from './enums'
-export type Data = Record<string, unknown>
-
/**
* Public utility type for extracting the instance type of a component.
* Works with all valid component definition types. This is intended to replace
- import {
+ import type {
+ Component,
ComponentInternalInstance,
- SetupContext,
ComponentInternalOptions,
- Component,
ConcreteComponent,
- InternalRenderFunction
- Data,
+ InternalRenderFunction,
+ SetupContext,
} from './component'
import {
- isFunction,
++ type Data,
+ type LooseRequired,
+ NOOP,
+ type Prettify,
extend,
- isString,
- isObject,
isArray,
- NOOP,
+ isFunction,
+ isObject,
isPromise,
- LooseRequired,
- Prettify,
- Data
+ isString,
} from '@vue/shared'
- import { isRef, Ref } from '@vue/reactivity'
+ import { type Ref, isRef } from '@vue/reactivity'
import { computed } from './apiComputed'
import {
+ type WatchCallback,
+ type WatchOptions,
+ createPathGetter,
watch,
- WatchOptions,
- WatchCallback,
- createPathGetter
} from './apiWatch'
- import { provide, inject } from './apiInject'
+ import { inject, provide } from './apiInject'
import {
+ type DebuggerHook,
+ type ErrorCapturedHook,
+ onActivated,
onBeforeMount,
- onMounted,
+ onBeforeUnmount,
onBeforeUpdate,
- onUpdated,
+ onDeactivated,
onErrorCaptured,
+ onMounted,
onRenderTracked,
- onBeforeUnmount,
- onUnmounted,
- onActivated,
- onDeactivated,
onRenderTriggered,
- DebuggerHook,
- ErrorCapturedHook,
- onServerPrefetch
+ onServerPrefetch,
+ onUnmounted,
+ onUpdated,
} from './apiLifecycle'
import {
+ type ComputedGetter,
+ type WritableComputedOptions,
reactive,
- ComputedGetter,
- WritableComputedOptions
} from '@vue/reactivity'
- import {
+ import type {
ComponentObjectPropsOptions,
- ExtractPropTypes,
+ ComponentPropsOptions,
ExtractDefaultPropTypes,
- ComponentPropsOptions
+ ExtractPropTypes,
} from './componentProps'
- import { EmitsOptions, EmitsToProps } from './componentEmits'
- import { Directive } from './directives'
+ import type { EmitsOptions, EmitsToProps } from './componentEmits'
+ import type { Directive } from './directives'
import {
- CreateComponentPublicInstance,
- ComponentPublicInstance,
+ type ComponentPublicInstance,
+ type CreateComponentPublicInstance,
+ type IntersectionMixin,
+ type UnwrapMixinsType,
isReservedPrefix,
- IntersectionMixin,
- UnwrapMixinsType
} from './componentPublicInstance'
import { warn } from './warning'
- import { VNodeChild } from './vnode'
+ import type { VNodeChild } from './vnode'
import { callWithAsyncErrorHandling } from './errorHandling'
import { deepMergeData } from './compat/data'
import { DeprecationTypes } from './compat/compatConfig'
import {
- toRaw,
+ TriggerOpTypes,
shallowReactive,
+ shallowReadonly,
+ toRaw,
trigger,
- TriggerOpTypes,
- shallowReadonly
} from '@vue/reactivity'
import {
++ type Data,
+ EMPTY_ARR,
EMPTY_OBJ,
+ type IfAny,
+ PatchFlags,
camelize,
- hyphenate,
capitalize,
- isString,
- isFunction,
- isArray,
- isObject,
- hasOwn,
- toRawType,
- PatchFlags,
- makeMap,
- isReservedProp,
- EMPTY_ARR,
def,
extend,
+ hasOwn,
+ hyphenate,
+ isArray,
+ isFunction,
+ isObject,
isOn,
- IfAny,
- Data
+ isReservedProp,
+ isString,
+ makeMap,
+ toRawType,
} from '@vue/shared'
import { warn } from './warning'
import {
- ComponentInternalInstance,
- ComponentOptions,
- ConcreteComponent,
+ type ComponentInternalInstance,
+ type ComponentOptions,
+ type ConcreteComponent,
- type Data,
setCurrentInstance,
- unsetCurrentInstance
+ unsetCurrentInstance,
} from './component'
import { isEmitListener } from './componentEmits'
import { InternalObjectKey } from './vnode'
import {
- ComponentInternalInstance,
+ type ComponentInternalInstance,
- type Data,
getExposeProxy,
- isStatefulComponent
+ isStatefulComponent,
} from './component'
import { nextTick, queueJob } from './scheduler'
- import { instanceWatch, WatchOptions, WatchStopHandle } from './apiWatch'
import {
+ type WatchOptions,
+ type WatchStopHandle,
+ instanceWatch,
+ } from './apiWatch'
+ import {
++ type Data,
EMPTY_OBJ,
- hasOwn,
- isGloballyAllowed,
+ type IfAny,
NOOP,
+ type Prettify,
+ type UnionToIntersection,
extend,
- isString,
+ hasOwn,
isFunction,
- UnionToIntersection,
- Prettify,
- IfAny,
- Data
+ isGloballyAllowed,
+ isString,
} from '@vue/shared'
import {
- toRaw,
+ type ShallowUnwrapRef,
+ TrackOpTypes,
+ type UnwrapNestedRefs,
shallowReadonly,
+ toRaw,
track,
- TrackOpTypes,
- ShallowUnwrapRef,
- UnwrapNestedRefs
} from '@vue/reactivity'
import {
- ExtractComputedReturns,
- ComponentOptionsBase,
- ComputedOptions,
- MethodOptions,
- ComponentOptionsMixin,
- OptionTypesType,
- OptionTypesKeys,
+ type ComponentInjectOptions,
+ type ComponentOptionsBase,
+ type ComponentOptionsMixin,
+ type ComputedOptions,
+ type ExtractComputedReturns,
+ type InjectToObject,
+ type MergedComponentOptionsOverride,
+ type MethodOptions,
+ type OptionTypesKeys,
+ type OptionTypesType,
resolveMergedOptions,
shouldCacheAccess,
- MergedComponentOptionsOverride,
- InjectToObject,
- ComponentInjectOptions
} from './componentOptions'
- import { EmitsOptions, EmitFn } from './componentEmits'
- import { SlotsType, UnwrapSlotsType } from './componentSlots'
+ import type { EmitFn, EmitsOptions } from './componentEmits'
+ import type { SlotsType, UnwrapSlotsType } from './componentSlots'
import { markAttrsAccessed } from './componentRenderUtils'
import { currentRenderingInstance } from './componentRenderContext'
import { warn } from './warning'
import {
- ComponentInternalInstance,
- FunctionalComponent,
- getComponentName
+ type ComponentInternalInstance,
- type Data,
+ type FunctionalComponent,
+ getComponentName,
} from './component'
import {
- VNode,
- normalizeVNode,
- createVNode,
Comment,
+ type VNode,
+ type VNodeArrayChildren,
+ blockStack,
cloneVNode,
- VNodeArrayChildren,
+ createVNode,
isVNode,
- blockStack
+ normalizeVNode,
} from './vnode'
- import { handleError, ErrorCodes } from './errorHandling'
+ import { ErrorCodes, handleError } from './errorHandling'
-import { PatchFlags, ShapeFlags, isModelListener, isOn } from '@vue/shared'
+import {
++ type Data,
+ PatchFlags,
+ ShapeFlags,
- isOn,
+ isModelListener,
- Data
++ isOn,
+} from '@vue/shared'
import { warn } from './warning'
import { isHmrUpdating } from './hmr'
- import { NormalizedProps } from './componentProps'
+ import type { NormalizedProps } from './componentProps'
import { isEmitListener } from './componentEmits'
import { setCurrentRenderingInstance } from './componentRenderContext'
import {
])
*/
- import { VNode } from './vnode'
- import { isFunction, EMPTY_OBJ, isBuiltInDirective, Data } from '@vue/shared'
+ import type { VNode } from './vnode'
-import { EMPTY_OBJ, isBuiltInDirective, isFunction } from '@vue/shared'
-import { warn } from './warning'
+ import {
- type ComponentInternalInstance,
+ type Data,
- getExposeProxy,
-} from './component'
++ EMPTY_OBJ,
++ isBuiltInDirective,
++ isFunction,
++} from '@vue/shared'
+import { warn } from './warning'
- import { ComponentInternalInstance, getExposeProxy } from './component'
++import { type ComponentInternalInstance, getExposeProxy } from './component'
import { currentRenderingInstance } from './componentRenderContext'
- import { callWithAsyncErrorHandling, ErrorCodes } from './errorHandling'
- import { ComponentPublicInstance } from './componentPublicInstance'
+ import { ErrorCodes, callWithAsyncErrorHandling } from './errorHandling'
+ import type { ComponentPublicInstance } from './componentPublicInstance'
import { mapCompatDirectiveHook } from './compat/customDirective'
import { pauseTracking, resetTracking } from '@vue/reactivity'
import { traverse } from './apiWatch'
- import { Slots, RawSlots } from '../componentSlots'
-import type { Data } from '../component'
+ import type { RawSlots, Slots } from '../componentSlots'
import {
- ContextualRenderFn,
- currentRenderingInstance
+ type ContextualRenderFn,
+ currentRenderingInstance,
} from '../componentRenderContext'
import {
Comment,
+ Fragment,
+ type VNode,
+ type VNodeArrayChildren,
+ createBlock,
isVNode,
- VNodeArrayChildren,
openBlock,
- createBlock,
- Fragment,
- VNode
} from '../vnode'
- import { PatchFlags, SlotFlags, Data } from '@vue/shared'
-import { PatchFlags, SlotFlags } from '@vue/shared'
++import { type Data, PatchFlags, SlotFlags } from '@vue/shared'
import { warn } from '../warning'
import { createVNode } from '@vue/runtime-core'
import { isAsyncWrapper } from '../apiAsyncComponent'
ObjectDirective,
FunctionDirective,
DirectiveArguments,
- DirectiveModifiers
++ DirectiveModifiers,
} from './directives'
export type { SuspenseBoundary } from './components/Suspense'
export type {
import {
- Text,
- Fragment,
Comment,
+ Fragment,
+ Static,
+ Text,
+ type VNode,
+ type VNodeArrayChildren,
+ type VNodeHook,
+ type VNodeProps,
cloneIfMounted,
- normalizeVNode,
- VNode,
- VNodeArrayChildren,
createVNode,
+ invokeVNodeHook,
isSameVNodeType,
- Static,
- VNodeHook,
- VNodeProps,
- invokeVNodeHook
+ normalizeVNode,
} from './vnode'
import {
- ComponentInternalInstance,
- ComponentOptions,
+ type ComponentInternalInstance,
+ type ComponentOptions,
- type Data,
createComponentInstance,
- setupComponent
+ setupComponent,
} from './component'
import {
filterSingleRoot,
renderComponentRoot,
shouldUpdateComponent,
- updateHOCHostEl
+ updateHOCHostEl,
} from './componentRenderUtils'
import {
- EMPTY_OBJ,
++ type Data,
EMPTY_ARR,
- isReservedProp,
+ EMPTY_OBJ,
+ NOOP,
PatchFlags,
ShapeFlags,
- NOOP,
+ getGlobalThis,
invokeArrayFns,
isArray,
- getGlobalThis,
- Data
+ isReservedProp,
} from '@vue/shared'
import {
- queueJob,
- queuePostFlushCb,
+ type SchedulerJob,
flushPostFlushCbs,
- invalidateJob,
flushPreFlushCbs,
- SchedulerJob
+ invalidateJob,
+ queueJob,
+ queuePostFlushCb,
} from './scheduler'
- import { pauseTracking, resetTracking, ReactiveEffect } from '@vue/reactivity'
+ import { ReactiveEffect, pauseTracking, resetTracking } from '@vue/reactivity'
import { updateProps } from './componentProps'
import { updateSlots } from './componentSlots'
- import { pushWarningContext, popWarningContext, warn } from './warning'
- import { createAppAPI, CreateAppFunction } from './apiCreateApp'
+ import { popWarningContext, pushWarningContext, warn } from './warning'
+ import { type CreateAppFunction, createAppAPI } from './apiCreateApp'
import { setRef } from './rendererTemplateRef'
import {
- SuspenseBoundary,
+ type SuspenseBoundary,
+ type SuspenseImpl,
queueEffectWithSuspense,
- SuspenseImpl
} from './components/Suspense'
- import { TeleportImpl, TeleportVNode } from './components/Teleport'
- import { isKeepAlive, KeepAliveContext } from './components/KeepAlive'
- import { registerHMR, unregisterHMR, isHmrUpdating } from './hmr'
- import { createHydrationFunctions, RootHydrateFunction } from './hydration'
+ import type { TeleportImpl, TeleportVNode } from './components/Teleport'
+ import { type KeepAliveContext, isKeepAlive } from './components/KeepAlive'
+ import { isHmrUpdating, registerHMR, unregisterHMR } from './hmr'
+ import { type RootHydrateFunction, createHydrationFunctions } from './hydration'
import { invokeDirectiveHook } from './directives'
- import { startMeasure, endMeasure } from './profiling'
+ import { endMeasure, startMeasure } from './profiling'
import {
devtoolsComponentAdded,
devtoolsComponentRemoved,
import {
- isArray,
- isFunction,
- isString,
- isObject,
++ type Data,
EMPTY_ARR,
- extend,
- normalizeClass,
- normalizeStyle,
PatchFlags,
ShapeFlags,
SlotFlags,
+ extend,
+ isArray,
+ isFunction,
+ isObject,
isOn,
- Data
+ isString,
+ normalizeClass,
+ normalizeStyle,
} from '@vue/shared'
import {
- ComponentInternalInstance,
- ConcreteComponent,
- ClassComponent,
- Component,
- isClassComponent
+ type ClassComponent,
+ type Component,
+ type ComponentInternalInstance,
+ type ConcreteComponent,
- type Data,
+ isClassComponent,
} from './component'
- import { RawSlots } from './componentSlots'
- import { isProxy, Ref, toRaw, ReactiveFlags, isRef } from '@vue/reactivity'
- import { AppContext } from './apiCreateApp'
+ import type { RawSlots } from './componentSlots'
import {
- Suspense,
- SuspenseImpl,
+ type ReactiveFlags,
+ type Ref,
+ isProxy,
+ isRef,
+ toRaw,
+ } from '@vue/reactivity'
+ import type { AppContext } from './apiCreateApp'
+ import {
+ type Suspense,
+ type SuspenseBoundary,
+ type SuspenseImpl,
isSuspense,
- SuspenseBoundary
} from './components/Suspense'
- import { DirectiveBinding } from './directives'
- import { TransitionHooks } from './components/BaseTransition'
+ import type { DirectiveBinding } from './directives'
+ import type { TransitionHooks } from './components/BaseTransition'
import { warn } from './warning'
- import { Teleport, TeleportImpl, isTeleport } from './components/Teleport'
+ import {
+ type Teleport,
+ type TeleportImpl,
+ isTeleport,
+ } from './components/Teleport'
import {
currentRenderingInstance,
- currentScopeId
+ currentScopeId,
} from './componentRenderContext'
- import { RendererNode, RendererElement } from './renderer'
+ import type { RendererElement, RendererNode } from './renderer'
import { NULL_DYNAMIC_COMPONENT } from './helpers/resolveAssets'
import { hmrDirtyComponents } from './hmr'
import { convertLegacyComponent } from './compat/component'
- import { VNode } from './vnode'
+ import type { VNode } from './vnode'
import {
- ComponentInternalInstance,
- ConcreteComponent,
- formatComponentName
+ type ComponentInternalInstance,
+ type ConcreteComponent,
- type Data,
+ formatComponentName,
} from './component'
- import { isString, isFunction, Data } from '@vue/shared'
- import { toRaw, isRef, pauseTracking, resetTracking } from '@vue/reactivity'
- import { callWithErrorHandling, ErrorCodes } from './errorHandling'
-import { isFunction, isString } from '@vue/shared'
++import { type Data, isFunction, isString } from '@vue/shared'
+ import { isRef, pauseTracking, resetTracking, toRaw } from '@vue/reactivity'
+ import { ErrorCodes, callWithErrorHandling } from './errorHandling'
type ComponentVNode = VNode & {
type: ConcreteComponent
- import * as m from 'monaco-editor'
- import { CompilerError } from '@vue/compiler-dom'
- import { compile, CompilerOptions } from '@vue/compiler-vapor'
+ import type * as m from 'monaco-editor'
-import {
- type CompilerError,
- type CompilerOptions,
- compile,
-} from '@vue/compiler-dom'
-import { compile as ssrCompile } from '@vue/compiler-ssr'
++import type { CompilerError } from '@vue/compiler-dom'
++import { type CompilerOptions, compile } from '@vue/compiler-vapor'
+// import { compile as ssrCompile } from '@vue/compiler-ssr'
++
import {
- defaultOptions,
compilerOptions,
+ defaultOptions,
initOptions,
- ssrMode
+ ssrMode,
} from './options'
import { toRaw, watchEffect } from '@vue/runtime-dom'
import { SourceMapConsumer } from 'source-map-js'
- import { h, reactive, createApp, ref } from 'vue'
- import { CompilerOptions } from '@vue/compiler-vapor'
+ import { createApp, h, reactive, ref } from 'vue'
-import type { CompilerOptions } from '@vue/compiler-dom'
++import type { CompilerOptions } from '@vue/compiler-vapor'
import { BindingTypes } from '@vue/compiler-core'
export const ssrMode = ref(false)
version: 20.10.5
'@types/semver':
specifier: ^7.5.5
- version: 7.5.5
+ version: 7.5.6
+ '@typescript-eslint/eslint-plugin':
+ specifier: ^6.16.0
- version: 6.16.0(@typescript-eslint/parser@6.15.0)(eslint@8.56.0)(typescript@5.2.2)
++ version: 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.2.2)
'@typescript-eslint/parser':
specifier: ^6.15.0
- version: 6.15.0(eslint@8.56.0)(typescript@5.2.2)
+ version: 6.16.0(eslint@8.56.0)(typescript@5.2.2)
'@vitest/coverage-istanbul':
specifier: ^1.1.0
version: 1.1.0(vitest@1.1.0)
eslint-define-config:
specifier: ^1.24.1
version: 1.24.1
- version: /eslint-plugin-i@2.29.1(@typescript-eslint/parser@6.15.0)(eslint@8.56.0)
+ eslint-plugin-import:
+ specifier: npm:eslint-plugin-i@^2.29.1
++ version: /eslint-plugin-i@2.29.1(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)
eslint-plugin-jest:
specifier: ^27.6.0
- version: 27.6.0(eslint@8.56.0)(typescript@5.2.2)
+ version: 27.6.0(@typescript-eslint/eslint-plugin@6.16.0)(eslint@8.56.0)(typescript@5.2.2)
estree-walker:
specifier: ^2.0.2
version: 2.0.2
dev: true
optional: true
- /@typescript-eslint/eslint-plugin@6.16.0(@typescript-eslint/parser@6.15.0)(eslint@8.56.0)(typescript@5.2.2):
++ /@typescript-eslint/eslint-plugin@6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.2.2):
+ resolution: {integrity: sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
+ eslint: ^7.0.0 || ^8.0.0
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@eslint-community/regexpp': 4.9.1
- '@typescript-eslint/parser': 6.15.0(eslint@8.56.0)(typescript@5.2.2)
++ '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.2.2)
+ '@typescript-eslint/scope-manager': 6.16.0
+ '@typescript-eslint/type-utils': 6.16.0(eslint@8.56.0)(typescript@5.2.2)
+ '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.2.2)
+ '@typescript-eslint/visitor-keys': 6.16.0
+ debug: 4.3.4
+ eslint: 8.56.0
+ graphemer: 1.4.0
+ ignore: 5.2.4
+ natural-compare: 1.4.0
+ semver: 7.5.4
+ ts-api-utils: 1.0.3(typescript@5.2.2)
+ typescript: 5.2.2
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
- /@typescript-eslint/parser@6.15.0(eslint@8.56.0)(typescript@5.2.2):
- resolution: {integrity: sha512-MkgKNnsjC6QwcMdlNAel24jjkEO/0hQaMDLqP4S9zq5HBAUJNQB6y+3DwLjX7b3l2b37eNAxMPLwb3/kh8VKdA==}
+ /@typescript-eslint/parser@6.16.0(eslint@8.56.0)(typescript@5.2.2):
+ resolution: {integrity: sha512-H2GM3eUo12HpKZU9njig3DF5zJ58ja6ahj1GoHEHOgQvYxzoFJJEvC1MQ7T2l9Ha+69ZSOn7RTxOdpC/y3ikMw==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
- typescript
dev: true
- '@types/semver': 7.5.5
+ /@typescript-eslint/utils@6.16.0(eslint@8.56.0)(typescript@5.2.2):
+ resolution: {integrity: sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ eslint: ^7.0.0 || ^8.0.0
+ dependencies:
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
+ '@types/json-schema': 7.0.14
++ '@types/semver': 7.5.6
+ '@typescript-eslint/scope-manager': 6.16.0
+ '@typescript-eslint/types': 6.16.0
+ '@typescript-eslint/typescript-estree': 6.16.0(typescript@5.2.2)
+ eslint: 8.56.0
+ semver: 7.5.4
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+ dev: true
+
/@typescript-eslint/visitor-keys@5.62.0:
resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>= 8.6.0'}
dev: true
- /eslint-plugin-jest@27.6.0(eslint@8.56.0)(typescript@5.2.2):
+ /eslint-import-resolver-node@0.3.9:
+ resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
+ dependencies:
+ debug: 3.2.7
- is-core-module: 2.13.1
++ is-core-module: 2.13.0
+ resolve: 1.22.8
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
- /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.15.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0):
++ /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.16.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0):
+ resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
+ engines: {node: '>=4'}
+ peerDependencies:
+ '@typescript-eslint/parser': '*'
+ eslint: '*'
+ eslint-import-resolver-node: '*'
+ eslint-import-resolver-typescript: '*'
+ eslint-import-resolver-webpack: '*'
+ peerDependenciesMeta:
+ '@typescript-eslint/parser':
+ optional: true
+ eslint:
+ optional: true
+ eslint-import-resolver-node:
+ optional: true
+ eslint-import-resolver-typescript:
+ optional: true
+ eslint-import-resolver-webpack:
+ optional: true
+ dependencies:
- '@typescript-eslint/parser': 6.15.0(eslint@8.56.0)(typescript@5.2.2)
++ '@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.2.2)
+ debug: 3.2.7
+ eslint: 8.56.0
+ eslint-import-resolver-node: 0.3.9
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
- /eslint-plugin-i@2.29.1(@typescript-eslint/parser@6.15.0)(eslint@8.56.0):
++ /eslint-plugin-i@2.29.1(@typescript-eslint/parser@6.16.0)(eslint@8.56.0):
+ resolution: {integrity: sha512-ORizX37MelIWLbMyqI7hi8VJMf7A0CskMmYkB+lkCX3aF4pkGV7kwx5bSEb4qx7Yce2rAf9s34HqDRPjGRZPNQ==}
+ engines: {node: '>=12'}
+ peerDependencies:
+ eslint: ^7.2.0 || ^8
+ dependencies:
+ debug: 4.3.4
+ doctrine: 3.0.0
+ eslint: 8.56.0
+ eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.15.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0)
++ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.16.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0)
+ get-tsconfig: 4.7.2
+ is-glob: 4.0.3
+ minimatch: 3.1.2
+ semver: 7.5.4
+ transitivePeerDependencies:
+ - '@typescript-eslint/parser'
+ - eslint-import-resolver-typescript
+ - eslint-import-resolver-webpack
+ - supports-color
+ dev: true
+
+ /eslint-plugin-jest@27.6.0(@typescript-eslint/eslint-plugin@6.16.0)(eslint@8.56.0)(typescript@5.2.2):
resolution: {integrity: sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
peerDependencies:
jest:
optional: true
dependencies:
- '@typescript-eslint/eslint-plugin': 6.16.0(@typescript-eslint/parser@6.15.0)(eslint@8.56.0)(typescript@5.2.2)
++ '@typescript-eslint/eslint-plugin': 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.2.2)
'@typescript-eslint/utils': 5.62.0(eslint@8.56.0)(typescript@5.2.2)
eslint: 8.56.0
transitivePeerDependencies:
// Rollup to complain for non-ESM targets, so we use separate entries for
// esm vs. non-esm builds.
if (isCompatPackage && (isBrowserESMBuild || isBundlerESMBuild)) {
- entryFile = /runtime$/.test(format)
- ? `src/esm-runtime.ts`
- : `src/esm-index.ts`
+ entryFile = `esm-${entryFile}`
+ }
+ entryFile = 'src/' + entryFile
+
+ return {
+ input: resolve(entryFile),
+ // Global and Browser ESM builds inlines everything so that they can be
+ // used alone.
+ external: resolveExternal(),
+ plugins: [
+ json({
- namedExports: false
++ namedExports: false,
+ }),
+ alias({
- entries
++ entries,
+ }),
+ enumPlugin,
+ ...resolveReplace(),
+ esbuild({
+ tsconfig: path.resolve(__dirname, 'tsconfig.json'),
+ sourceMap: output.sourcemap,
+ minify: false,
+ target: isServerRenderer || isNodeBuild ? 'es2019' : 'es2015',
- define: resolveDefine()
++ define: resolveDefine(),
+ }),
+ ...resolveNodePlugins(),
- ...plugins
++ ...plugins,
+ ],
+ output,
+ onwarn(msg, warn) {
+ if (msg.code !== 'CIRCULAR_DEPENDENCY') {
+ warn(msg)
+ }
+ },
+ treeshake: {
- moduleSideEffects: false
- }
++ moduleSideEffects: false,
++ },
}
function resolveDefine() {
function createProductionConfig(/** @type {PackageFormat} */ format) {
return createConfig(format, {
- file: resolve(`dist/${name}.${format}.prod.js`)
+ ...outputConfigs[format],
- format: outputConfigs[format].format,
+ file: resolve(`dist/${name}.${format}.prod.js`),
})
}
return createConfig(
format,
{
- file: outputConfigs[format].file.replace(/\.js$/, '.prod.js')
+ ...outputConfigs[format],
- format: outputConfigs[format].format,
+ file: outputConfigs[format].file.replace(/\.js$/, '.prod.js'),
},
[
terser({
? `runtime.${format.replace(/-runtime$/, '')}`
: format
-const outfile = resolve(
- __dirname,
- `../packages/${target}/dist/${
- target === 'vue-compat' ? `vue` : target
- }.${postfix}.${prod ? `prod.` : ``}js`,
-)
-const relativeOutfile = relative(process.cwd(), outfile)
+for (const target of targets) {
+ const pkg = require(`../packages/${target}/package.json`)
+ const outfile = resolve(
+ __dirname,
+ `../packages/${target}/dist/${
+ target === 'vue-compat' ? `vue` : target
- }.${postfix}.${prod ? `prod.` : ``}js`
++ }.${postfix}.${prod ? `prod.` : ``}js`,
+ )
+ const relativeOutfile = relative(process.cwd(), outfile)
-// resolve externals
-// TODO this logic is largely duplicated from rollup.config.js
-/** @type {string[]} */
-let external = []
-if (!inlineDeps) {
- // cjs & esm-bundler: external all deps
- if (format === 'cjs' || format.includes('esm-bundler')) {
- external = [
- ...external,
- ...Object.keys(pkg.dependencies || {}),
- ...Object.keys(pkg.peerDependencies || {}),
- // for @vue/compiler-sfc / server-renderer
- 'path',
- 'url',
- 'stream',
- ]
- }
+ // resolve externals
+ // TODO this logic is largely duplicated from rollup.config.js
+ /** @type {string[]} */
+ let external = []
+ if (!inlineDeps) {
+ // cjs & esm-bundler: external all deps
+ if (format === 'cjs' || format.includes('esm-bundler')) {
+ external = [
+ ...external,
+ ...Object.keys(pkg.dependencies || {}),
+ ...Object.keys(pkg.peerDependencies || {}),
+ // for @vue/compiler-sfc / server-renderer
+ 'path',
+ 'url',
- 'stream'
++ 'stream',
+ ]
+ }
- if (target === 'compiler-sfc') {
- const consolidatePkgPath = require.resolve(
- '@vue/consolidate/package.json',
- {
- paths: [resolve(__dirname, `../packages/${target}/`)],
- },
- )
- const consolidateDeps = Object.keys(
- require(consolidatePkgPath).devDependencies,
- )
- external = [
- ...external,
- ...consolidateDeps,
- 'fs',
- 'vm',
- 'crypto',
- 'react-dom/server',
- 'teacup/lib/express',
- 'arc-templates/dist/es5',
- 'then-pug',
- 'then-jade',
- ]
+ if (target === 'compiler-sfc') {
+ const consolidatePkgPath = require.resolve(
+ '@vue/consolidate/package.json',
+ {
- paths: [resolve(__dirname, `../packages/${target}/`)]
- }
++ paths: [resolve(__dirname, `../packages/${target}/`)],
++ },
+ )
+ const consolidateDeps = Object.keys(
- require(consolidatePkgPath).devDependencies
++ require(consolidatePkgPath).devDependencies,
+ )
+ external = [
+ ...external,
+ ...consolidateDeps,
+ 'fs',
+ 'vm',
+ 'crypto',
+ 'react-dom/server',
+ 'teacup/lib/express',
+ 'arc-templates/dist/es5',
+ 'then-pug',
- 'then-jade'
++ 'then-jade',
+ ]
+ }
}
-}
-/** @type {Array<import('esbuild').Plugin>} */
-const plugins = [
- {
- name: 'log-rebuild',
- setup(build) {
- build.onEnd(() => {
- console.log(`built: ${relativeOutfile}`)
- })
+ /** @type {Array<import('esbuild').Plugin>} */
+ const plugins = [
+ {
+ name: 'log-rebuild',
+ setup(build) {
+ build.onEnd(() => {
+ console.log(`built: ${relativeOutfile}`)
+ })
- }
- }
++ },
+ },
- },
-]
+ ]
-if (format !== 'cjs' && pkg.buildOptions?.enableNonBrowserBranches) {
- plugins.push(polyfillNode())
-}
+ if (format !== 'cjs' && pkg.buildOptions?.enableNonBrowserBranches) {
+ plugins.push(polyfillNode())
+ }
-esbuild
- .context({
- entryPoints: [resolve(__dirname, `../packages/${target}/src/index.ts`)],
- outfile,
- bundle: true,
- external,
- sourcemap: true,
- format: outputFormat,
- globalName: pkg.buildOptions?.name,
- platform: format === 'cjs' ? 'node' : 'browser',
- plugins,
- define: {
- __COMMIT__: `"dev"`,
- __VERSION__: `"${pkg.version}"`,
- __DEV__: prod ? `false` : `true`,
- __TEST__: `false`,
- __BROWSER__: String(
- format !== 'cjs' && !pkg.buildOptions?.enableNonBrowserBranches,
- ),
- __GLOBAL__: String(format === 'global'),
- __ESM_BUNDLER__: String(format.includes('esm-bundler')),
- __ESM_BROWSER__: String(format.includes('esm-browser')),
- __NODE_JS__: String(format === 'cjs'),
- __SSR__: String(format === 'cjs' || format.includes('esm-bundler')),
- __COMPAT__: String(target === 'vue-compat'),
- __FEATURE_SUSPENSE__: `true`,
- __FEATURE_OPTIONS_API__: `true`,
- __FEATURE_PROD_DEVTOOLS__: `false`,
- __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__: `false`,
- },
- })
- .then(ctx => ctx.watch())
+ esbuild
+ .context({
+ entryPoints: [resolve(__dirname, `../packages/${target}/src/index.ts`)],
+ outfile,
+ bundle: true,
+ external,
+ sourcemap: true,
+ format: outputFormat,
+ globalName: pkg.buildOptions?.name,
+ platform: format === 'cjs' ? 'node' : 'browser',
+ plugins,
+ define: {
+ __COMMIT__: `"dev"`,
+ __VERSION__: `"${pkg.version}"`,
+ __DEV__: prod ? `false` : `true`,
+ __TEST__: `false`,
+ __BROWSER__: String(
- format !== 'cjs' && !pkg.buildOptions?.enableNonBrowserBranches
++ format !== 'cjs' && !pkg.buildOptions?.enableNonBrowserBranches,
+ ),
+ __GLOBAL__: String(format === 'global'),
+ __ESM_BUNDLER__: String(format.includes('esm-bundler')),
+ __ESM_BROWSER__: String(format.includes('esm-browser')),
+ __NODE_JS__: String(format === 'cjs'),
+ __SSR__: String(format === 'cjs' || format.includes('esm-bundler')),
+ __COMPAT__: String(target === 'vue-compat'),
+ __FEATURE_SUSPENSE__: `true`,
+ __FEATURE_OPTIONS_API__: `true`,
+ __FEATURE_PROD_DEVTOOLS__: `false`,
- __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__: `false`
- }
++ __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__: `false`,
++ },
+ })
+ .then(ctx => ctx.watch())
+}
'compiler-core',
'compiler-dom',
'compiler-ssr',
- 'shared'
+ 'compiler-vapor',
+ 'shared',
]
let allFilesPresent = true
import { brotliCompressSync, gzipSync } from 'node:zlib'
const sizeDir = path.resolve('temp/size')
-const entry = path.resolve('./packages/vue/dist/vue.runtime.esm-bundler.js')
+const vue = path.resolve('./packages/vue/dist/vue.runtime.esm-bundler.js')
+const vapor = path.resolve(
- './packages/vue-vapor/dist/vue-vapor.runtime.esm-bundler.js'
++ './packages/vue-vapor/dist/vue-vapor.runtime.esm-bundler.js',
+)
interface Preset {
name: string
}
const presets: Preset[] = [
- { name: 'createApp', imports: ['createApp'] },
- { name: 'createSSRApp', imports: ['createSSRApp'] },
- { name: 'defineCustomElement', imports: ['defineCustomElement'] },
+ { name: 'createApp', imports: ['createApp'], from: vue },
+ { name: 'createSSRApp', imports: ['createSSRApp'], from: vue },
+ {
+ name: 'defineCustomElement',
+ imports: ['defineCustomElement'],
- from: vue
++ from: vue,
+ },
+ { name: 'vapor', imports: '*', from: vapor },
{
name: 'overall',
imports: [
'watch',
'Transition',
'KeepAlive',
- 'Suspense'
+ 'Suspense',
],
- from: vue
- }
++ from: vue,
+ },
]
main()
globals: true,
setupFiles: 'scripts/setup-vitest.ts',
environmentMatchGlobs: [
- ['packages/{vue,vue-compat,runtime-dom,runtime-vapor}/**', 'jsdom']
- ['packages/{vue,vue-compat,runtime-dom}/**', 'jsdom'],
++ ['packages/{vue,vue-compat,runtime-dom,runtime-vapor}/**', 'jsdom'],
],
sequence: {
- hooks: 'list'
+ hooks: 'list',
},
coverage: {
provider: 'istanbul',