-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat: browserslist support #162
Comments
I've made a package that autodetects your browserslist config and returns an esbuild-compatible browsers list you can pass to the |
This does not seem to work for mobile
|
@jaxonly fixed in version 1.1.0. If you put |
As mentioned in evanw/esbuild#121 we have found https://github.com/nihalgonsalves/esbuild-plugin-browserslist from @nihalgonsalves to work quite nicely. const { resolveToEsbuildTarget } = require('esbuild-plugin-browserslist');
...
// defaults to: browserslist('> 0.5%, last 2 versions, Firefox ESR, not dead')
const targets = resolveToEsbuildTarget(browserslist()); We then use |
If this will be added, keep it opt-in please so the plugin stays lightweight. I personally don't consider needing |
Is your feature request related to a problem? Please describe.
Usually browser support is defined in a browserslist file that all preprocessors look at. However, you must pass in a target manually to esbuild-loader.
Describe the solution you'd like
Automatic detection of browserslist to determine target.
Describe alternatives you've considered
Additional context
References:
The text was updated successfully, but these errors were encountered: