Coder Social home page Coder Social logo

Comments (6)

 avatar commented on September 24, 2024

RequireJS exhibits no issues with the define(['exports'], function(exports){ ... }) pattern, but perhaps I'm using it incorrectly.

from curl.

unscriptable avatar unscriptable commented on September 24, 2024

Hey Kit!

You're using it correctly. Btw, that's some awesomely comprehensive boilerplate in your example. :)

This appears to be a google closure issue. My tests fail in the same way when I use the closure-compressed curl.js files in the dist folder. If you want to move forward, use the uncompressed curl.js in the src folder while I look into this further.

Thanks for finding this!

  • John

from curl.

 avatar commented on September 24, 2024

Hi John!

I just tested it with the uncompressed curl.js, and it works perfectly. Thanks so much for looking into this; I thought that my call to define may have been in error. I'm using curl.js in a unit test to ensure that my library is compatible with AMD script loaders, so minification is not a concern.

If you'd like, however, I can test minification with Uglify for you...I've found that it produces better results than Closure Compiler in some cases.

Thanks again!

from curl.

unscriptable avatar unscriptable commented on September 24, 2024

Found the problem. I needed to quote some commonjs parameter names ("exports", "require") in some more places. unscriptable@7b26633

from curl.

unscriptable avatar unscriptable commented on September 24, 2024

The fix for this was committed in unscriptable@7b26633. Closing.

from curl.

 avatar commented on September 24, 2024

Fantastic!

from curl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.