The problem is the optimizer looks for .js file when one exists.
The main file looks as follows:
require(['cs!coffee/models/Account'], function (Account) {
// ...
});
Then, when I run Grunt task, following is printed:
>> Error: ENOENT: no such file or directory, open
>> '/home/dc/kiapp/assets/js/coffee/models/Account.js'
As you see, cs looks for .js file. Note that when I type a file that doesn't exist:
require(['cs!coffee/models/AccountABCDEF'], function (Account) {
// ...
});
Optimizer does look for .coffee file!
>> Error: ENOENT: no such file or directory, open
>> '/home/dc/kiapp/assets/js/coffee/models/AccountABCDEF.coffee'