Monday 15 September 2014

javascript - Require.js Loads Dependency from Wrong Path -


with moduledep to load module with the following required.js config Is getting dependency from the app's root ( /moduledep.js ) instead of the mapped path ( /assets/path/module/moduledep.js ) .

  need.config ({path: {"module": "assets / path / module"}, map: {"module": {"moduledep": "assets / path / module / Moduledep "}}});   

Is there a requirement that would be ignoring the mapped path?

It seems that the functionality has its limitations.

From Docs:

This feature works well for scripts only, which are real AMD modules that define calls () and forms of anonymous modules Register at Also, Use only full module id for relative map IDs (such as '../some/thing') do not work.

No comments:

Post a Comment