Skip to content

iitm wrappers copy exported primitives #118

@timfish

Description

@timfish

When you export primitives in ESM, they are exposed as references which means they can be written to from elsewhere within the module. A reproduction of this behaviour can be seen in #113.

Because the iitm wrappers assign each export to a variable before re-exporting, primitive exports have their original value copied and the reference is lost.

This is where the code generation does that:

let $${n} = _.${n}
export { $${n} as ${n} }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions