Naming inconsistency between CommonJs and EsModule...
# javascript
n
Naming inconsistency between CommonJs and EsModules. Is there any reason for this? I opened an issue, and just edited it to add the source cause of the problem. I’m ok to PR to fix the problem, I’m just not sure about why it was made like this before. https://youtrack.jetbrains.com/issue/KT-75592/KJS-CommonJS-and-EsModules-exports-are-named-differently
t
CommonJS - legacy output (for KJS) ESM - new output (optimal for budlers)
e
> CommonJS - legacy output (for KJS) I don't consider it a "legacy" output, as CommonJS is probably the most commonly used module system at this point. The difference is ESM exports aims to target the per-file export, effectively eliminating the need for ad-hoc namespacing. You basically replace them with a folder structure to represent the Kotlin package structure.