Giter Club home page Giter Club logo

Comments (2)

unscriptable avatar unscriptable commented on May 17, 2024

Hello Ryan,

curl.js is strict about module ids. (It seems strange to me that RequireJS is not.) I can't think of a good use case for having them be different. Try this:

The module at util/foo.

// note the module id includes the package and/or folder
define('util/foo', { foo: 'bar' })

The loading:

require(['util/foo'], function (f) { console.log(f) });

Is there a reason to have the module name not include the package/folder name? If you need it to be different for some reason, you could use the paths: {} config to map it instead.

Also: the build-time mechanics of the AMD tools are not standardized, yet. What this means to you: require.js's optimizer could do things that curl.js's loader isn't expecting. We expect to have the details agreed upon soon, though. This shouldn't be an issue for you currently unless you are using plugins. That's where the AMD build tools differ the most right now. If there are other issues, they're likely minor and can be fixed easily, I suspect.

I haven't tried using curl.js with other optimizers in a while, so I would be very interested in your success. Your feedback is greatly appreciated!

Regards,

-- John

P.S. please close this issue if/when you're satisfied with my answer and/or solution. I hate when somebody closes my tickets before I think they're closed. :)

from curl.

unscriptable avatar unscriptable commented on May 17, 2024

Hey Ryan. Were you able to resolve this problem? Regards, -- John

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.