diff --git a/tools/webpack.config.ts b/tools/webpack.config.ts index 75cad3d322..ab1c8e6452 100644 --- a/tools/webpack.config.ts +++ b/tools/webpack.config.ts @@ -109,15 +109,22 @@ export default (env?: string): webpack.Configuration[] => { }, { test: /\.hbs$/, - loader: 'handlebars-loader', - options: { - // Tell webpack not to explicitly require these. - knownHelpers: ['if', 'unless', 'each', 'with', - // The ones below are defined in static/js/templates.js - 'plural', 'eq', 'and', 'or', 'not', - 't', 'tr', 'rendered_markdown'], - preventIndent: true, - }, + use: [ + cacheLoader, + { + loader: 'handlebars-loader', + options: { + // Tell webpack not to explicitly require these. + knownHelpers: [ + 'if', 'unless', 'each', 'with', + // The ones below are defined in static/js/templates.js + 'plural', 'eq', 'and', 'or', 'not', + 't', 'tr', 'rendered_markdown', + ], + preventIndent: true, + }, + }, + ], }, // load fonts and files {