`jam compile` incorrectly shimming underscore #134

nfriedly opened this Issue Mar 1, 2013 · 0 comments

1 participant


Whenever I include a file that depends on underscore.js, it gets an undefined value. When I run this command:

jam compile --no-minify --almond -o _test.js -i underscore

The outputted file includes almond, underscore, and then this snippet at the end:

define('underscore', ['underscore/underscore'], function (main) { return main; });

define("underscore/underscore", function(){});

I think the first define statement there is incorrect. My jam/require.config.js includes this snippet, which I believe should instruct jam to make a define statement that returns _ rather than main:

        "name": "underscore",
        "location": "jam/underscore",
        "main": "underscore.js"
"shim": {
    "underscore": {
        "exports": "_"

I had a similar issue with jQuery before upgrading jam from 0.2.13 to 0.2.15.

Any idea how this could happen? I'm pretty sure that it all worked on jam 0.2.13 a month or so ago and I'm not sure what's changed since them.

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