saiwong / ember-handlebars-brunch

Ember Handlebars integration for Brunch
MIT License
2 stars 13 forks source link

Precompiled templates not being added to Ember.TEMPLATES #3

Open kevinpauli opened 11 years ago

kevinpauli commented 11 years ago

I am getting the error message

Uncaught Error: assertion failed: You specified the templateName templates/about for <App.AboutView:ember170>, but it did not exist. vendor.js:14209

My view is specified like this:

App.AboutView = Ember.View.extend({
    templateName: 'templates/about'
});

My config.coffee has:

templates:
  precompile: true
  root: 'templates/'
  defaultExtension: 'hbs'
  joinTo: 'javascripts/app.js' : /^app/

My app.js ended up with this in it:

window.require.register("templates/about", function(exports, require, module) {

  Ember.TEMPLATES[module.id] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
  helpers = helpers || Ember.Handlebars.helpers;
    var foundHelper, self=this;
data.buffer.push("  <h2>About MyApp</h2>\r\n");
  });
   module.exports = module.id;
});

But my Ember.TEMPLATES doesn't seem to have it. From Chrome console:

>Ember.TEMPLATES
Object {application: function}

Any ideas on what I'm doing wrong?

bzz commented 10 years ago

Got the same issue using ember-handlebars-brunch on ember-1.1.2 That makes sense as this plugin is official unsupported any more.

Though i'v got the same issue with https://github.com/bartsqueezy/ember-handlebars-brunch and https://github.com/chrixian/ember-precompiler-brunch