When my modules are compiled to esm. What version of Javascript is that? Is it ES5? How can I find out?
Thanks
It's in ES5 because the ecosystem has no standardised way to specify the JS version the code was authored in.
Also of note: the modern format is ESM but using ES2017 ** instead of ES5.
** Specifically, it's the ES2017 features that were implemented in browsers when they shipped <script type=module> support. That means the modern bundle produced by Microbundle should support these browsers without modification:
You can read more about why this version choice makes sense at @babel/preset-modules.
Most helpful comment
It's in ES5 because the ecosystem has no standardised way to specify the JS version the code was authored in.