wip: initial compat build setup
This commit is contained in:
25
packages/shared/src/deprecations.ts
Normal file
25
packages/shared/src/deprecations.ts
Normal 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}` : ``}`
|
||||
)
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user