Skip to content

[Declarative Shadow DOM Style Sharing] Unclear how this works icw bundling #896

Closed
@jpzwarte

Description

@jpzwarte

So i like the proposed ability. However, i'm unclear how the proposal impacts development vs production.

In development you most likely have a folder with:

  • my-custom-element.js
  • my-custom-element.css

And you would have import styles from './my-custom-element.css' with { type: 'css' }; in my-custom-element.js. So this is a relative path.

How do you get from this relative path to an absolute path as shown in the specifier attribute in the proposal? Do we need new tooling where the custom element is "compiled" to HTML that uses <template shadowrootmode="open"> and convert the relative paths to absolute paths?

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