Skip to content

Upgrading to 1.2 from 1.1.8 breaks requirejs usage #27

@vrobinson

Description

@vrobinson

Code to reproduce the issue:

<script src="/libs/require/2.3.2/require.min.js" type="text/javascript" data-main="/config"></script> requirejs.config({ paths: { 'switch-path': '//unpkg.com/switch-path@1.2.0/dist/switch-path' }, });

define(function (require) {
const switchPath = require('switch-path');
});

Expected behavior:
switchPath to be defined

Actual behavior:
swithPath is undefined

Versions of packages used:
This code works in v1.1.8, but not v1.2.0. A diff of the two files shows that the first line of code which wraps the rest of the file is pretty different.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions