Basically the stuff that https://www.npmjs.com/package/elm-esm does but native. Elm's current IIFE (immediately invoked function expression) setup is here: https://github.com/lamdera/compiler/blob/9612b171f2a38a391de5d97f3aaac6626c3e6ed6/compiler/src/Generate/JavaScript.hs#L50 ### Stuff to look into - [ ] Can a `generateEsm` function be written right next to there that does what we need? - [ ] If not, what other changes does ESM output require?
Basically the stuff that https://www.npmjs.com/package/elm-esm does but native.
Elm's current IIFE (immediately invoked function expression) setup is here:
compiler/compiler/src/Generate/JavaScript.hs
Line 50 in 9612b17
Stuff to look into
generateEsmfunction be written right next to there that does what we need?