thomasboyt / broccoli-baked-handlebars

broccoli transform that turns hbs into html
6 stars 0 forks source link

Cannot use Handlebars partials #1

Open jamesarosen opened 9 years ago

jamesarosen commented 9 years ago

I'd love to be able to do

{{!-- html/index.hbs --}}
{{> header}}
{{> main}}
{{> footer}}

but I get an exception:

Built with error:
File: index.hbs
Error
    at Object.<anonymous> (/Users/me/project/style/node_modules/broccoli-baked-handlebars/node_modules/handlebars/dist/cjs/handlebars/exception.js:26:23)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/me/project/node_modules/broccoli-baked-handlebars/node_modules/handlebars/dist/cjs/handlebars/base.js:3:17)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

Part of the problem, I suspect, is that broccoli-baked-handlebars doesn't know about the rest of the tree since its first argument is just a tree containing the one main index.hbs file.

jamesarosen commented 9 years ago

For those who find this page because they have the same request, try broccoli-render-handlebars.