Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Don't rename require statements out of define scope #367

Closed

Description

@guybedford

When require is rescoped we need to no longer rename it. Issue reported in jspm/jspm#1221.

Activity

  1. dmcnaugh commented on Oct 24, 2015

    @dmcnaugh

    This bug appears since jspm/jspm-cli 0.16.13 (possibly a typo in the original, linked issue post suggesting 0.16.3) pointing towards a change in systemjs-builder from 0.14.8 to 0.14.9

  2. guybedford commented on Oct 29, 2015

    @guybedford
    MemberAuthor

    Fixed in 7b112e1.

  3. guybedford commented on Oct 31, 2015

    @guybedford
    MemberAuthor

    Released in 0.14.10.

  4. dmcnaugh commented on Nov 1, 2015

    @dmcnaugh

    I've looked at the generated bundle code and I don't believe this issued is correctly resolved.
    With 0.14.10 all the references to 'require' are now consistently renamed to 'req' so there is no longer a runtime error from the bundle. But 'require' is still being renamed to 'req'.
    Specifically this will cause a problem for any package that uses both 'req' and 'require' in the same scope. Having tested this, it causes bundle generation to fail.
    In 0.14.9 the issue was that not all references to 'require' were consistently changed to 'req'. Prior to 0.14.9 I didn't see this happening.

  5. guybedford commented on Nov 1, 2015

    @guybedford
    MemberAuthor

    @dmcnaugh thanks, yes this should be a more obscure name to avoid conflicts. I've added 86ecb73 to avoid this.

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

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