Question

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.

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top