mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
webpack: Use cacheLoader for handlebars files.
This seems to save about 1s for run-dev.py startup time.
This commit is contained in:
@@ -109,16 +109,23 @@ export default (env?: string): webpack.Configuration[] => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.hbs$/,
|
test: /\.hbs$/,
|
||||||
|
use: [
|
||||||
|
cacheLoader,
|
||||||
|
{
|
||||||
loader: 'handlebars-loader',
|
loader: 'handlebars-loader',
|
||||||
options: {
|
options: {
|
||||||
// Tell webpack not to explicitly require these.
|
// 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
|
// The ones below are defined in static/js/templates.js
|
||||||
'plural', 'eq', 'and', 'or', 'not',
|
'plural', 'eq', 'and', 'or', 'not',
|
||||||
't', 'tr', 'rendered_markdown'],
|
't', 'tr', 'rendered_markdown',
|
||||||
|
],
|
||||||
preventIndent: true,
|
preventIndent: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
// load fonts and files
|
// load fonts and files
|
||||||
{
|
{
|
||||||
test: /\.(woff(2)?|ttf|eot|svg|otf|png)$/,
|
test: /\.(woff(2)?|ttf|eot|svg|otf|png)$/,
|
||||||
|
|||||||
Reference in New Issue
Block a user