Baklava browser support and applying polyfills #232
Replies: 2 comments
-
I think we need to document polyfill requirements in our Storybook on the related page and should give the responsibility and the decision to the app developer. With that approach, we can avoid to re-apply some polyfills that app developers already applied in their applications. We can create a Browser Support document like Lit has and inform consumers about polyfill requirements regarding their desired browser support. Also, it would be nice to mention those requirements in the related components if it's needed for a significant portion of the users (like mentioning ElementInternals polyfill in the documents of form field components). |
Beta Was this translation helpful? Give feedback.
-
It is an issue right now, you can write your thoughts there. |
Beta Was this translation helpful? Give feedback.
-
We are using Baklava in production at our internal project for a long time. Therefore, it should be always production ready even if it's in @beta. There are still many people using old browsers and there are some limitations and to-dos for supporting older browsers. At first glance, we applied the polyfills by adding them to our shell application because we didn't want to add them to baklava's released package and everything just worked like a charm!
However, we think that it is worth opening a discussion about it. Because we don't have any strategy. Right now, looks like there are two ways to handle this.
globalThis
polyfill adds up to 5KB in gzip.)Or, we can find/create a way that gives us an ability to lazily import those polyfills depending on the conditions (Safari, Chrome ver. < 70, etc.)
For example, we needed to add element-internals-polyfill to our project to support
Safari
. We thought that we need to have a nicer way to import this if there is a trick or practice that we can use for this. Here you can see the issue that we opened forElementInternals
.TL;DR
We should define a strategy for supporting problems or/and simply define our limitations for
baklava
to tell people about do's and don'ts.I want to hear your opinions about it.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions