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.