Giter Site home page Giter Site logo

error in compiled file about almond HOT 5 CLOSED

nexflo avatar nexflo commented on August 16, 2024
error in compiled file

from almond.

Comments (5)

jrburke avatar jrburke commented on August 16, 2024

Right, almond does not implement require.toUrl or require.nameToUrl. If it was to implement one, it would probably be require.toUrl since that is part the the AMD-related require spec.

However, I was under the (possibly wrong) assumption that it was mostly only used by plugins, and almond only supports loader plugins that can inline their resources in a build, and not do dynamic loading calls.

So if this error is generated by a loader plugin, then it probably means the loader plugin does not implement the build API and/or assumes it can do a runtime dynamic load of a dependency, where almond is focused on just supporting a bunch of modules/plugin resources that have already been statically burned into a built file. See the README's Restrictions section.

If you are using nameToUrl as part of just regular module that uses it for other things besides module/plugin loading more detail on that would be appreciated.

from almond.

nexflo avatar nexflo commented on August 16, 2024

well...im using a bootstrap file which loads in quite a few modules / plugins via
require([
'order!vendor/jquery-1.7',
'order!_settings',
etc.

and also in submodules...using define/require...i was under the impression that that's exactly what almond does and thats its imitations are that it only supports local define/requires?

Not loading any external dependencies in.

from almond.

jrburke avatar jrburke commented on August 16, 2024

Oh, so if it is just the order loader plugin in play, then yes, I would expect that to work. I'll try to work up a test case then. It may take a couple days.

from almond.

nexflo avatar nexflo commented on August 16, 2024

thx! :)

from almond.

jrburke avatar jrburke commented on August 16, 2024

I fixed this by fixing order.js -- it is using a non-standard AMD API, so it is better if it feature detects. You can try out the latest order.js on master to confirm the fix. The fix is tracked in requirejs issue 169 and will be part of the 1.0.5 release with requirejs.

from almond.

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.