Skip to content

browser esm injector fails using extends from class #3671

@userquin

Description

@userquin

Describe the bug

When adding lit example in the new browser PR I've found a problem in examples/lit/src/my-button.ts web component:

imagen

We're not generating the __vi_esm_0. prefix, and so it is failing in L17 in the screenshot below. I can bypass the problem using:

const LitElementClass = LitElement
/**
 * An example button.
 *
 * @slot - This button has a slot
 */
@customElement('my-button')
export class MyButton extends LitElementClass {

imagen

Reproduction

I'm preparing it in the browser PR here in Vitest: #3584

System Info

npx envinfo --system --npmPackages '{vitest,@vitest/*,vite,@vitejs/*}' --binaries --browsers

  System:
    OS: Windows 10 10.0.19044
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 36.39 GB / 63.71 GB
  Binaries:
    Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.58)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions