website icon indicating copy to clipboard operation
website copied to clipboard

babel-preset-env: do not repeat, that targets.esmodules discards targets.browsers

Open dilyanpalauzov opened this issue 5 years ago • 2 comments

https://babeljs.io/docs/en/babel-preset-env#targetsesmodules says:

When specifying this option, the browsers field will be ignored. You can use this approach in combination with to conditionally serve smaller scripts to users (https://jakearchibald.com/2017/es-modules-in-browsers/#nomodule-for-backwards-compatibility).

Please note: when specifying the esmodules target, browsers targets will be ignored.

As this text says twice, that targets.browsers will be ignored, deduplicate it.

dilyanpalauzov avatar May 12 '20 16:05 dilyanpalauzov

Hey @dilyanpalauzov! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

babel-bot avatar May 12 '20 16:05 babel-bot

@dilyanpalauzov Thanks for your report. PR is always welcome!

JLHwung avatar May 12 '20 18:05 JLHwung