Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

[BUG] - Web Component crashes when calling inject-api-custom-element.ts #123

@ihardyslide

Description

@ihardyslide

Describe the bug

Hi,

first I want to say thank you for this nice library which helped me getting my stylings correct for the component library I am working on!

Unfortunately I came across one issue, which I couldn't solve on my own yet.
Under some circumstances I could not fully pin down by now, my app crashes while rendering the web components.

This is the error I am getting:
image

I reverse engineered it and found that the line causing the error is this one:

+ ' this.shadowRoot.insertBefore(s, this._childStylesAnchor);\n'

The strange thing is, that it works for the whole loop (for each stylesheet) it goes through for one component, but suddenly crashes on the last iteration.

Have you maybe experienced something similar in the past?
I could not find anything related in the issues section.
Unfortunately I can not provide you with example code, because I can not publish the relevant code parts to public.

Version used:
@unplugin-vue-ce/sub-style: 1.0.0-beta.17

Thanks & BR

Reproduction

not possible, internal code

System Info

System:

    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)

    CPU: (3) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz

    Memory: 16.04 GB / 17.24 GB

    Container: Yes

    Shell: 5.1.4 - /bin/bash

  Binaries:

    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node

    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm

  Browsers:

    Chrome: 120.0.6099.216

Used Package Manager

npm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a unplugin-vue-ce issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs instead.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions