Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


data-main fetch the file even when is is compiled #65

jfromaniello opened this Issue · 0 comments

1 participant


I have a problem with the data-main attribute, i dont know if it is a problem of requirejs or jam.

the script tag in my html looks like this:

<script src="/jam/require.js" data-main="/main.js" /> 

and the main file as follows:

require(["jquery"], function($){

when I run this in the dev environment everything works just fine.

The problem came when I compile this thing by doing:

jam compile -i main.js -o jam/require.js

It seems that in the output file, require.js first will explore and fetch what it is in the data-main attribute and then it calls define("/main.js").

So, the thing is that the require.js file has the main.js code, but the page still fetch the main.js file when it shouldnt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.