Durandal 2.0 has some breaking changes from its earlier version. If you are converting from 1.x to 2.0, read this documentation first. I haven’t converted my project that is currently in production (nepris.com) into 2.0 yet. I wanted to figure out 2.0 first before I jump into that change. So, for a different smaller application, I started with Durandal 2.0. I used Durandal Starter Kit with Visual Studio 2012 to get the base template up. While developing locally, everything ran pretty well, but ran into some issues with building it for production. Here are some notes… (BTW, I like 2.0 already, feels much more clean and stable than 1.x)
- Durandal 2.0 uses a new build system, it uses weyland. I followed the instructions on Durandal site (link) . It failed !! – Issue is in the weyland-config.js in the root of your project. Open this config file and delete the line it saying ** mainConfigFile:’App/main.js’ This will get you past this error.
- If you are working with Visual Studio, you can automate this build – Follow this instructions (Durandal docs are getting better day by day
- For every production deployment, you still need to bust the cache using the following:
Rest of the stuff worked pretty straight forward. I will be converting my 1.x application to 2.0 soon, will post once everything gets done.