Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTMLElement is not defined in v3.2 (knightly) #4129

Closed
cexbrayat opened this issue Jul 16, 2021 · 1 comment
Closed

HTMLElement is not defined in v3.2 (knightly) #4129

cexbrayat opened this issue Jul 16, 2021 · 1 comment

Comments

@cexbrayat
Copy link
Member

Version

3.2.0 knightly build (3.1.4-knightly-3-2.202107160112)

Reproduction link

cexbrayat/vue-v313#2

Steps to reproduce

In a classic CLI project, use the knightly build of the v3.2 branch

  "resolutions": {
    "vue": "npm:@knightly/vue@3-2",
    "@vue/runtime-dom": "npm:@knightly/vue__runtime-dom@3-2",
    "@vue/compiler-sfc": "npm:@knightly/vue__compiler-sfc@3-2"
  }

Then serve the project:

yarn serve

What is expected?

It should start without errors

What is actually happening?

It throws:

ReferenceError: HTMLElement is not defined
ReferenceError: HTMLElement is not defined
    at Object.<anonymous> (/Users/ced-pro/Code/test/vue-cli-tests/vue-v313/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js:481:26)

This comes from:

class VueElement extends HTMLElement {

introduced in ee2882e for defineCustmElement

@yyx990803
Copy link
Member

Yeah it seems we need to lazy define the VueElement class for SSR env. But I'm curious why the cjs build of @vue/runtime-dom is loaded here...

@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants