سؤال

Is there a way in requireJS to have it write to the console all inner error messages? The problem when a load fails is the innermost and standard logging qrites to the console the outermost.

هل كانت مفيدة؟

المحلول

If you build your application on the CLI and run the RequireJS Optimizer - you can see Require traversing your dependency tree and it will show you which file it failed to load.

> grunt

Running "requirejs:compile" (requirejs) task
Error: ENOENT, no such file or directory 'C:\Users\Daniel\Work\.js'
In module tree:
    main
      bootstrap
        base-view
          main-menu
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top