Mimosa and requirejs define paths

105 Views Asked by At

Would anyone happen to know how to change the default define(['whatever'] path on the compiled handlebars templates?

At the moment Mimosa compiles my .hbs files to a single .js file and everything works ok - except that I'm using requirejs and the define path Mimosa gives is a complete path to handlebars.js file instead of simply "handlebars" as I would like it to be.

It's now

define(['home/blaaahblaah/www/project/public/vendor/javascripts/handlebars'], function (Handlebars){

instead of

define(['handlebars'], function (Handlebars){

This sucks because now I have to manually change the define every time something changes in the .hbs files...

I bet this can be changed somewhere in the mimosa-config file but I wouldn't know where or how...

1

There are 1 best solutions below

3
On

Have you tried putting handelbars:"home/blaaahblaah/www/project/public/vendor/javascripts/handlebars" in your requirejs paths? Mimosa should use that.

Could you toss an example repo up on github? Would love to help figure out why its putting that path in.