Skip to content

Update codegen to use mangled names in exports? #2847

Description

@garyb

For example, at the moment, we do:

module.exports = { "foo'": foo$prime }

Perhaps instead we should use the same name in the exports that we have locally:

module.exports = { foo$prime: foo$prime }

This applies to any mangling, $prime was just an example, there are a bunch of other cases too.

This would fix a whole bunch of warnings that rollup-plugin-purs spits out, and would match the behaviour that we'll eventually use for ES6 modules whenever that happens.

Activity

  1. added this to the 1.0 milestone on Apr 15, 2017
  2. paf31 commented on Apr 15, 2017

    @paf31
    Contributor

    I'd be happy to do this at the same time we move to ES6, since I think the current behavior is slightly nicer from the JS side.

  3. removed this from the 1.0 milestone on Apr 15, 2017
  4. hdgarrood commented on Apr 15, 2017

    @hdgarrood
    Contributor

    Do we have an issue open for something like this already? I vaguely remember something about changing mangling to help with a future switchover to ES6.

  5. garyb commented on Apr 15, 2017

    @garyb
    MemberAuthor

    @hdgarrood you're right, #2558 - I thought it was tucked away in one of the mega-ES6-discussion threads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions