Skip to content
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

Legacy browser support #88

Closed
brandonburkett opened this issue Aug 18, 2023 · 4 comments
Closed

Legacy browser support #88

brandonburkett opened this issue Aug 18, 2023 · 4 comments

Comments

@brandonburkett
Copy link

We are still on 1.6.3, any reason why 2.x branch doesn't use vite legacy plugin to support older browsers?

@kytta
Copy link
Owner

kytta commented Aug 18, 2023

In my understanding, Vite's primary focus is on the applications: bundles of HTML, CSS, and JS. By default, Vite would use ESM to use JS on the page. vite-legacy-plugin can be used to instead use IIFE, and thus allow importing JS in older browsers.

Shareon, however, is a library, and we export an IIFE build. Apart from that, the JS code is simple enough that it supports way more browsers than we target, so maybe you don't need to stay on 1.x. Do you have a browser you need to support but which doesn't work?

Having said that, I also do not want to support older browsers. Share buttons are unimportant to the user, so I don't care that much about covering a wide range of browsers. If I would add support for IE9 and whatever, the bundle size would grow, and I don't want that.

@brandonburkett
Copy link
Author

We need to support iOS11, desktop safari 11, and a few Samsung / LG smartTV browsers. I believe I read in the changelog browser support was set to last 2 versions and I didn't actually test if 2.x worked out.

I'll do some testing with 2.x or stick with 1.6.x

Thanks!

@kytta
Copy link
Owner

kytta commented Aug 23, 2023

We need to support iOS11, desktop safari 11, and a few Samsung / LG smartTV browsers.

I have a question about that. I am currently planning and testing the next iteration of Shareon, Shareon v3, where I want to get rid of the existing CSS hacks and re-layout the buttons using Flexbox. Do the browsers you test on (in particular Smart TVs) support it and how do they handle it?

@brandonburkett
Copy link
Author

Yes! We have had decent success using flexbox with Samsung, LG, as well as Amazon fire "internet" app with flexbox. Flex-gap is not well supported in these browsers but align-items / justify-items / grow / shrink all work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants