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,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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue