Closed sormy closed 5 years ago
Hi, babel got recently merged full es3 support as a part of preset-es3 (https://github.com/babel/babel/pull/9781). It could be really nice to have rollup to also support es3 and the change needed for commonjs is pretty small. Let me know if I can do anything else to move forward with this PR. Thank you.
Hi @sormy,
I will not make any promises for Rollup itself supporting ES3 any time soon—not too long ago, we removed legacy mode as it was basically too hard to maintain without proper ES3 environment tests and there is a lot of different auto-generated code that will not work in such an environment. Nevertheless, I could see us accomodate this specific change as long as this is not seen as a promise to become fully ES3 compliant.
Added support for ancient ES3 browsers, like IE6, IE7, IE8 without breaking compatibility with modern browsers. The build output after minifiers will depend on minifier configuration. For example,
uglifyjs
will keepx['default']
if{ ie8: true }
is set and will convert back tox.default
if not set. This is a safe change that will add ES3 support for free without impact on modern browsers.Fixes #364