systemjs / plugin-babel

SystemJS Babel Plugin
MIT License
83 stars 33 forks source link

2.0 #90

Open guybedford opened 6 years ago

guybedford commented 6 years ago

This updates this plugin to SystemJS 2.0

The new approach is simply to drop in the script tag "babel-transform.js" which includes a Browser build of Babel.

davidkhess commented 5 years ago

Is it expected that this should work in IE11?

See https://github.com/systemjs/plugin-babel/issues/93

guybedford commented 5 years ago

Nope, IE11 support for this plugin isn't expected. We could look at adding it, but I'm not sure it's a good idea?

davidkhess commented 5 years ago

It's implied here that this plugin is the method for getting ES module loading in older browsers: https://github.com/systemjs/systemjs

To load ES modules directly in older browsers with SystemJS we can install and use the Babel plugin:

Isn't IE11 just about the only major browser now that this use case would even apply to?

https://caniuse.com/#search=module

If this plugin isn't going to support IE11 then it seems the statement above is not accurate.

For myself, it's really just a minor use-case of being able to debug directly from source code rather than having to debug via compiled code and source maps so it's no big loss.

And IE11 is mercifully almost dead anyway. It just keeps popping up in enterprise environments.

guybedford commented 5 years ago

@davidkhess I'd suggest for your use case have a look at shimport instead - https://github.com/Rich-Harris/shimport.

davidkhess commented 5 years ago

That looks very promising – thanks!