Question

My project is broken into several projects. One project is the main, and the others are for business domains.

Project.Main
Project.BusinessDomain1
Project.BusinessDomain2

As the weyland is applied to the Project.Main and it's the only project containing a main.js, the only files participate in creating main-built.js are those attached in Project.Main. As a matter of fact I want the other files to remain at their projects and load on demand by controllers later. But the problem is that I used Paths in those files, which weyland optimizer doesn't affect them( to replace the paths with real values).

FYI, I'm using Durandal 2.0.1 and HotTowel template.

Was it helpful?

Solution

There are a few things:

  • If your views are dynamically generated you obviously can't package them.
  • If you want to package some files and others not (such as the dynamically generated views) you can't use almond, you'd need to use the full requirejs. To do so, you need to go into the weyland config file and change almond to requirejs. Then you need to make sure that all your paths are correct at runtime.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top