cujojs / curl

curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts.
https://github.com/cujojs/curl/wiki
Other
1.89k stars 216 forks source link

jquery 1.7.1 not longer working #138

Closed manast closed 11 years ago

manast commented 11 years ago

Hello John,

it seems as if the latest release has broken something that hinders loading jquery. The script below was working yesterday. Today it gives this error:

Uncaught Error: define() missing or duplicated: http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js curl.js:3

To reproduce:

<html>
<head>
  <meta charset="utf-8">
  <script type="text/javascript">
    curl = {
      packages: {
        'jquery': {
        path:'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/',
        main:'jquery.min'
      },
    }
  };
  </script>

  <script src="https://raw.github.com/cujojs/curl/master/dist/curl-kitchen-sink/curl.js"></script>

  <script>
    curl(['jquery'], function($){
      console.log($);
    })
  </script>
</head>
<body>
</body>
</html>

best regards,

Manuel.

manast commented 11 years ago

oh, I forgot to add that I could confirm this error on lastest stable Chrome (21.0.1180.89) and also on Firefox 10.0.2.

:)

unscriptable commented 11 years ago

Wow. Thanks. curl.js is doing some weird things with main modules. I'm adding more tests and will issue a fix asap.

manast commented 11 years ago

You are the best. Thnx!

Sent from my iPad

On 25 sep 2012, at 21:27, John Hann notifications@github.com wrote:

Wow. Thanks. curl.js is doing some weird things with main modules. I'm adding more tests and will issue a fix asap.

— Reply to this email directly or view it on GitHub.

unscriptable commented 11 years ago

There was an untested case: non-anonymous main modules. I added a test case and a fix and pushed it to the dev branch. This fix will be in 0.7.1 later this week. Feel free to test the dev code and close this if you're satisfied. :)

manast commented 11 years ago

Yes. the issue is fixed on the dev branch.