babel-preset-extendscript icon indicating copy to clipboard operation
babel-preset-extendscript copied to clipboard

Current ES support

Open tracker1 opened this issue 7 years ago • 1 comments

It would be nice to include the presets/fills necessary to bring this up to an equivalent to babel-preset-env in terms of coverage, so that this can be used with, for example babel-preset-stage-3 or similar.

Perhaps a separate preset that can be used in conjunction with this one. (babel-preset-extendscript-stage-4 or babel-preset-extendscript-current) Not sure what else is needed in terms of regenerator runtime, etc. Or for that matter the performance impact as such. Would this work with the env preset configured for IE8, for example?

I also want to say, thank you for providing this, it's much appreciated.

tracker1 avatar Feb 28 '18 20:02 tracker1

I don't remember off the top of my head, but I think using any babel-preset-* directly doesn't work because one of the babel-plugins that it includes breaks Extendscript. So this preset only uses the working plugins from babel-preset-es2015. I forget which in particular one broke it.

Maybe making this preset configurable like babel-preset-env is would be the best route. Not sure how much work that would entail though.

I've been using this in conjunction with Typescript, which does it's own transpiling of modern JS features down to es3, so I haven't personally felt a need for it yet. But if you'd like to take a stab at going the configure route with this preset, that would be great!

fusepilot avatar Feb 28 '18 22:02 fusepilot