Take the 2-minute tour ×

I have many modules. One module loads another module, which loads another module. Etc...

And of course, when I load the page, all of these modules load. It works perfectly. Without the optimizer. (even though it takes a minute, because the browser has to load 50 things).

When I use optimizer...in my app.build.js, it seems that I have to manually specify each module!??

Why can't optimizer automatically traverse through the modules?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

You only have to specify the module you wanna optimize, not its dependencies. From the docs:


    appDir: "../",
    baseUrl: "scripts",
    modules: [
            name: "main"
share|improve this answer
When I do this, the optimizer will create "main.js" with everything minimized, and put only main's dependencies in there. It won't traverse to app.js, and then router.js, and then other modules.... –  user847495 Jan 8 '12 at 18:35
I want optimizer to traverse through the modules, and then include THEIR dependencies in the main.js, like a multi-level tree. Main.js should have EVERY module inside. –  user847495 Jan 8 '12 at 18:41
Also, I put these options in my app.build.js: optimizeAllPluginResources: true, findNestedDependencies: true, But they don't seem to have any effect –  user847495 Jan 8 '12 at 20:49
add comment


I had my paths wrong (I didn't understand baseURL , etc) . That's why things broke in the middle.

share|improve this answer
add comment

Your Answer


