babel / preset-modules

A Babel preset that targets modern browsers by fixing engine bugs (will be merged into preset-env eventually)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to properly target compatible browsers

rbenzazon opened this issue · comments

Hi,
Thanks for your contribution, this plugin is really useful.
I'm wondering if this plugin has any difference with the preset-env with esmodules set to true.
I would like to write a script that would target compatible browsers without using module/nomodule, because I read that this solution is not reliable and I need to avoid any double loading.
Is it possible to get the browser list compatible with this plugin and ideally it would be nice to ship with this plugin a function that returns true when compatible that we could use in the browser.
Regards

This plugin is superceded by the new bugfixes option in preset-env, which can be enabled with the following config:

{
  targets: { esmodules:true },
  bugfixes: true
}

The bugfixes option uses the same plugins as preset-modules, but allows customization of the browser config.