mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +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,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
 | 
			
		||||
                {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user