SlexAxton / require-handlebars-plugin

A plugin for handlebars in require.js (both in dev and build)
803 stars 202 forks source link

working with backbone and requirejs #121

Open freeeebird opened 11 years ago

freeeebird commented 11 years ago

I am working on an app based on on requirejs+ backbone. I also wanted to add hbs for handlebars templates usage. Without r.js optimization it works fine, however when I run optimization I get an error. "Handlebars not defined". This fall when checking dependencies : main Router List hbs Handlebars

Can you suggest anything?

Thanks

klaemo commented 11 years ago

You have to set up the path to Handlebars in your requirejs config. It should look something like this:

require.config({
  paths: {
    "Handlebars": "path-to/require-handlebars-plugin/Handlebars"
  }
})