Closed jpzwarte closed 1 month ago
I think the idea would be that whatever tooling you'd be using to emit my-custom-element.js
shadowRoot declaratively would also process and emit the styling in the proposed format.
Would that approach exclude using this proposal with buildless setups? Or a mix between buildless & bundled?
Don’t think so, it’s just up to you to deal with urls at that point… see https://github.com/MicrosoftEdge/MSEdgeExplainers/issues/890
Closing this and picking up the discussion in #890
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:
And you would have
import styles from './my-custom-element.css' with { type: 'css' };
inmy-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?