Jon DeWitt
Jon DeWitt
Oh, awesome, I was looking all over for a PostCSS plugin, but all the ones I found via Google were non-native custom syntax. Thanks for the link!
Thanks for your hard work @tanner-reits! I'm experiencing this issue also, but @wolthers' workaround only got me one step further before something else impeded me. When I import the component...
To address this issue, I've created a pull request myself, for your review: https://github.com/GoogleChrome/dialog-polyfill/pull/231
That's perfectly fine, all I'm looking to achieve is importing without throwing errors. I'll work on a PR!
So it's an issue of isomorphic code that can run on both server and client. When attempting to write a single definition for a web component that can SSR when...
Sure, and yeah that's all my pull request achieves, essentially. When imported on the server, with this change, it will simply ignore the polyfill rather than crash the script. If...
I'm not sure I really understand why it would be beneficial to exclude client+server apps. Maybe I'm not articulating clearly... the last time I tried a dynamic import with this...
What if this was exported as a module instead? ```ts import { ScopedCustomElementRegistryPolyfill } from '@webcomponents/scoped-custom-element-registry'; // leave it to the consumer to load the script or not. ScopedCustomElementRegistryPolyfill.load(); ```
Just to be extra clear, here is my use case. I wrote some scripts that will either render HTML on the server or upgrade custom elements on the client, automatically,...
> import '@webcomponents/scoped-custom-element-registry'; > Right, this isn't the intended usage of the polyfill. Elements shouldn't import it since it changes the global environment. The containing page should import it. Then...