mirror of https://github.com/zulip/zulip.git
webpack: Use cacheLoader for handlebars files.
This seems to save about 1s for run-dev.py startup time.
This commit is contained in:
parent
af5ba9bf36
commit
d0ffba96d9
|
@ -109,16 +109,23 @@ export default (env?: string): webpack.Configuration[] => {
|
|||
},
|
||||
{
|
||||
test: /\.hbs$/,
|
||||
use: [
|
||||
cacheLoader,
|
||||
{
|
||||
loader: 'handlebars-loader',
|
||||
options: {
|
||||
// Tell webpack not to explicitly require these.
|
||||
knownHelpers: ['if', 'unless', 'each', 'with',
|
||||
knownHelpers: [
|
||||
'if', 'unless', 'each', 'with',
|
||||
// The ones below are defined in static/js/templates.js
|
||||
'plural', 'eq', 'and', 'or', 'not',
|
||||
't', 'tr', 'rendered_markdown'],
|
||||
't', 'tr', 'rendered_markdown',
|
||||
],
|
||||
preventIndent: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// load fonts and files
|
||||
{
|
||||
test: /\.(woff(2)?|ttf|eot|svg|otf|png)$/,
|
||||
|
|
Loading…
Reference in New Issue