Tracking down optimizer issues in durandal.js

∥☆過路亽.° 提交于 2019-12-23 03:55:09

问题


I have a large application with a few hundred viewmodels but when I run the optimizer it doesn't combine them into the main-built.js, it just clears out the file.

Is there any way to get the optimizer to give you more information on where it had an error?


回答1:


Here are all the options available

  1. --mode Indicates whether the optimizer should only 'generate' the r.js config or actually 'build' the optimized JS application. Default value build
  2. --source The path to the folder which contains the application source.
  3. --config The path to the customized r.js configuration file to be used as a base for the generated configuration.
  4. --verbose Indicates that verbose console logging should be used. Default value false
  5. --loader Indicates which script loader to optimize for 'almond' or 'require'. Default value almond
  6. --plugin The view plugin used to optimize views into the final build file. Default value text
  7. --pluginExtension The view file extension. Default value .html

Using the optimizer is like so:

optimizer.exe --source c:\project1\app\ --mode generate

So, maybe you should try this:

optimizer.exe --verbose true

and if that doesn't work.. then you can always pull down the source and try and debug it locally.



来源:https://stackoverflow.com/questions/15671109/tracking-down-optimizer-issues-in-durandal-js

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!