-
…in reply to @ryanmr
ryanmr I haven't gone that direction (non-ESM => ESM), but from the other direction (ESM => non-ESM) the solution is basically: Implement some kind of loader/bundler that understands the non-standard format. If you're already in the non-standard format, you already have a bundler...
-
…in reply to @rockerest
ryanmr ... so in theory it's just a matter of adding a plugin (or something) that makes that bundler / loader understand ESM.
-
…in reply to @rockerest
ryanmr In practice, this may be harder than it sounds. If it's not immediately obvious how to do it, I'd almost say "convert" your project to ESM by _pretending_ it's ESM, and then doing the ESM => non-ESM dynamic conversion, but for every file...