-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add browserslist constraint #2788
Comments
May help a bit with #558 |
Thanks @varholak-peter, the browserslist settings from your PR works great with Parcel now. |
I'm not sure what you're suggesting here. Configuring |
For me, browserlist is more of a "can I use this for my project that requires me to support these browsers" kind of thing, when proposing the library. |
It's not an easy question :
Putting a browserlist in the project will send a false signal to users. Svelte is only a lib, not an application. The consumer / implementer will have to decide what level of support he wants, according to its constraints/userbase and adjust its build process and polyfills implementation. Browserlist is originally a tool for an app project, to centralize the place where we express the range of browsers the app have to support. As @maxmilton said :
|
Thanks @0gust1 for the clear explanation on where to use Further investigations (well... a few hours of debugging 😞) seem to show that the problem is actually coming from Parcel itself. Sorry @varholak-peter for the noise, hope your PR is not useless. By the way, as svelte is mostly used as node module, "engines": { "node": ">= 6.0.0" } as class feature is only available starting from version 6 (yes I'm getting picking nobody uses such old versions 😉 ). |
Adding browserslist constraint would greatly help integration by tools such as Parcel.
The use of ES6 classes in version 3.x without further informations in package.json actually prevent Parcel from correctly handling module transpilation (DeMoorJasper/parcel-plugin-svelte#44).
Browserslist configuration is kind of obscure to me, but the following constraint seems to work fine :
The text was updated successfully, but these errors were encountered: