Trying to implement handlebars-layouts, I get error when extending a partial:
ERROR in Template execution failed: TypeError: handlebars.compile is not a function
I registered the helpers and partials (handlebars.js):
<br />
2. Added the handlebars runtime to handlebars-loader options in webpack config ([webpack.config.js](https://github.com/martyan/start-coding/blob/handlebars-layouts/webpack.config.js#L37)):
<br />
3. Partial component [partial.hbs](https://github.com/martyan/start-coding/blob/handlebars-layouts/src/components/partial.hbs)
4. Extending partial [webpack-layouts.hbs](https://github.com/martyan/start-coding/blob/handlebars-layouts/src/pages/webpack-layouts.hbs)
<br />
<br />
What am I missing?
When I register the partial as follows, no error is appearing, but the partial is not extended ([handlebars.js](https://github.com/martyan/start-coding/blob/handlebars-layouts/src/helpers/handlebars.js#L9))
Trying to implement
handlebars-layouts
, I get error when extending a partial:ERROR in Template execution failed: TypeError: handlebars.compile is not a function
Handlebars.registerHelper(layouts(Handlebars))
const partial = fs.readFileSync('./src/components/partial.hbs', 'utf-8') Handlebars.registerPartial('partial', partial)
module.exports = Handlebars
/ ... / test: /.hbs$/, loader: 'handlebars-loader', options: { runtime: SRC_PATH + '/helpers/handlebars', helperDirs: [SRC_PATH + '/helpers'] } / ... /
Handlebars.registerPartial('partial', () => { return partial })