-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
importing this element breaks server-side-rendered app #243
Comments
The problematic line seems to come from the ShadyCSS polyfill which is used by the Polymer library that this component depends on. The content of the dist code is specific to your tooling and build setup. This element does not have any custom build rules. In general the code here expects to run in the browser (e.g. it asynchronously adds Google Charts library to the document) so it is better to exclude Have you been able to successfully use other Polymer-based web components in your SSR setup? Is it possible to customize your setup and exclude |
I've tried to only import the component in the client-side, but it is not exactly possible with ES6 w/o dynamic modules enabled and I don't know what happens to my Angular app/build/SSR when it is. In fact, there's no place for me to registry or unregister the elements, the
About the polyfills, I import'em myself in
Yes, but not Polymer v1, I was only successful with Origami module and I believe It is a little problematic to rule if ShadyCSS or google-carts should access window directly, because they are meant to be used in web, but (and it's a big but) even since jQuery golden times, I do check for Also, this polyfills thing could be one of the gilty for these excessive sizes web-components currently and usually have. Just to make my point stronger here about whether a element should not optionally depend of a polyfill or not. I can't blame anyone for the issue, maybe this issue should be in another repository, I need help here, hehe. |
This element (or at least it's dist code) does a lot of
window
variable usage, breaking an SSR app, since there's nowindow
on server-side. Error might be like that (this one's from an Angular app):The text was updated successfully, but these errors were encountered: