You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding the ?dev query parameter to an element's script URL helps. It disables minification and preserves function names. However,
CSS assets aren't served by esm.sh
The element styles are resolved at runtime relative to import.meta.url. esm.sh relocates JS into /es2022/, but doesn't serve CSS assets at those paths (or at the exports-mapped paths that we specified in package.json: ./*.css → ./src/*/*.css). All CSS requests return 404.
Our last commit in NudeElement that adds bundler compatibility to the styles plugin partially helps. getStyle() now handles bundler-friendly alternatives to relative URL resolution. However, CSS import attributes (the most reliable fix) lack Safari support, so a cross-browser solution is not there yet.
Unfortunately, even the upcoming change in the way we add shadow styles (static styles = new URL("./foo.css", import.meta.url)) won't work with esm.sh either. It's basically what it already does now.
Speaking of the color elements. There are two issues:
esm.sh) breaksgetSuperMethod()#94Adding the
?devquery parameter to an element's script URL helps. It disables minification and preserves function names. However,esm.shThe element styles are resolved at runtime relative to
import.meta.url.esm.shrelocates JS into/es2022/, but doesn't serve CSS assets at those paths (or at the exports-mapped paths that we specified inpackage.json:./*.css→./src/*/*.css). All CSS requests return 404.Our last commit in NudeElement that adds bundler compatibility to the styles plugin partially helps.
getStyle()now handles bundler-friendly alternatives to relative URL resolution. However, CSS import attributes (the most reliable fix) lack Safari support, so a cross-browser solution is not there yet.Unfortunately, even the upcoming change in the way we add shadow styles (
static styles = new URL("./foo.css", import.meta.url)) won't work withesm.sheither. It's basically what it already does now.