Pergunta

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.

Foi útil?

Solução

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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top