chore: warning for outdated hmr api usage
This commit is contained in:
parent
90bdf59f4c
commit
ac80ea2c19
@ -9,6 +9,7 @@ import {
|
|||||||
} from './component'
|
} from './component'
|
||||||
import { queueJob, queuePostFlushCb } from './scheduler'
|
import { queueJob, queuePostFlushCb } from './scheduler'
|
||||||
import { extend } from '@vue/shared'
|
import { extend } from '@vue/shared'
|
||||||
|
import { warn } from './warning'
|
||||||
|
|
||||||
export let isHmrUpdating = false
|
export let isHmrUpdating = false
|
||||||
|
|
||||||
@ -67,6 +68,14 @@ function createRecord(
|
|||||||
id: string,
|
id: string,
|
||||||
component: ComponentOptions | ClassComponent
|
component: ComponentOptions | ClassComponent
|
||||||
): boolean {
|
): boolean {
|
||||||
|
if (!component) {
|
||||||
|
warn(
|
||||||
|
`HMR API usage is out of date.\n` +
|
||||||
|
`Please upgrade vue-loader/vite/rollup-plugin-vue or other relevant ` +
|
||||||
|
`depdendency that handles Vue SFC compilation.`
|
||||||
|
)
|
||||||
|
component = {}
|
||||||
|
}
|
||||||
if (map.has(id)) {
|
if (map.has(id)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user