问题
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
- --mode Indicates whether the optimizer should only 'generate' the r.js config or actually 'build' the optimized JS application. Default value build
- --source The path to the folder which contains the application source.
- --config The path to the customized r.js configuration file to be used as a base for the generated configuration.
- --verbose Indicates that verbose console logging should be used. Default value false
- --loader Indicates which script loader to optimize for 'almond' or 'require'. Default value almond
- --plugin The view plugin used to optimize views into the final build file. Default value text
- --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