wip: initial compat build setup

This commit is contained in:
Evan You
2021-04-03 11:55:44 -04:00
parent 870f2a7ba3
commit 24850a99c6
14 changed files with 431 additions and 18 deletions

View File

@@ -0,0 +1,25 @@
export const enum DeprecationTypes {
DOM_TEMPLATE_MOUNT
}
type DeprecationData = {
message: string
link?: string
}
const deprecations: Record<DeprecationTypes, DeprecationData> = {
[DeprecationTypes.DOM_TEMPLATE_MOUNT]: {
message:
`Vue detected directives on the mount container. ` +
`In Vue 3, the container is no longer considered part of the template ` +
`and will not be processed/replaced.`,
link: `https://v3.vuejs.org/guide/migration/mount-changes.html`
}
}
export function warnDeprecation(key: DeprecationTypes) {
const { message, link } = deprecations[key]
console.warn(
`[Deprecation]: ${message}${link ? `\nFor more details, see ${link}` : ``}`
)
}

View File

@@ -12,6 +12,7 @@ export * from './domAttrConfig'
export * from './escapeHtml'
export * from './looseEqual'
export * from './toDisplayString'
export * from './deprecations'
/**
* List of @babel/parser plugins that are used for template expression