fix(hmr): make hmr working with class components (#2144)

This commit is contained in:
Katashin
2020-09-18 12:14:59 +08:00
committed by GitHub
parent 57bdaa2220
commit 422f05e085
4 changed files with 55 additions and 4 deletions

View File

@@ -800,3 +800,7 @@ export function formatComponentName(
return name ? classify(name) : isRoot ? `App` : `Anonymous`
}
export function isClassComponent(value: unknown): value is ClassComponent {
return isFunction(value) && '__vccOpts' in value
}