fix: ensure customElements API ssr compatibility

fix #4129
This commit is contained in:
Evan You
2021-07-16 10:40:06 -04:00
parent eca4d7891a
commit de32cfa43e
12 changed files with 49 additions and 1 deletions

View File

@@ -157,7 +157,11 @@ export const defineSSRCustomElement = ((options: any) => {
return defineCustomElement(options, hydrate)
}) as typeof defineCustomElement
export class VueElement extends HTMLElement {
const BaseClass = (typeof HTMLElement !== 'undefined'
? HTMLElement
: class {}) as typeof HTMLElement
export class VueElement extends BaseClass {
/**
* @internal
*/