Skip to content

Instantly share code, notes, and snippets.

@ndemengel
Last active November 20, 2016 20:56
Show Gist options
  • Save ndemengel/75349ad1b4f05a3bcb73aeb8d0302793 to your computer and use it in GitHub Desktop.
Save ndemengel/75349ad1b4f05a3bcb73aeb8d0302793 to your computer and use it in GitHub Desktop.
Webpack configuration for Handlebars templates
jspackConfiguration.module.loaders.push({
test: /\.hbs$/,
loader: 'handlebars-loader' +
// Tell handlebars-loader where our custom helpers are to be found.
// Note: helpers' names are derived from their file name.
'?helperDirs[]=' + __dirname + '/handlebars-helpers' +
// Force handlebars-loader not to include Handlebars runtime,
// since it is already included in our common bundle.
'&runtime=' + handlebarsModulePath
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment