Description
Originally written by @thomashoneyman
Rewriting CommonJS foreign modules is straightforward but the exact format into which we should rewrite them depends on what we do with purs bundle
.
If we were to drop our bundler we could rewrite exports.ƒ = function () {
to export const ƒ = function () {
(as @i-am-the-slime started to do in purescript/purescript-prelude#264) or export function ƒ() {
.
But if we are to keep our bundler we could rewrite this to export function ƒ() {
-- only once purescript/purescript#4044 is merged -- and other declarations should be exported as var
s (unless we extend the bundler to support lets, consts and other declarations).
As I said earlier, I think it's really unlikely anything happens to the bundler in the near future, so the second option is the one that's probably the way forward.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status