mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +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$/,
 | 
					                    test: /\.hbs$/,
 | 
				
			||||||
                    loader: 'handlebars-loader',
 | 
					                    use: [
 | 
				
			||||||
                    options: {
 | 
					                        cacheLoader,
 | 
				
			||||||
                        // Tell webpack not to explicitly require these.
 | 
					                        {
 | 
				
			||||||
                        knownHelpers: ['if', 'unless', 'each', 'with',
 | 
					                            loader: 'handlebars-loader',
 | 
				
			||||||
                            // The ones below are defined in static/js/templates.js
 | 
					                            options: {
 | 
				
			||||||
                            'plural', 'eq', 'and', 'or', 'not',
 | 
					                                // Tell webpack not to explicitly require these.
 | 
				
			||||||
                            't', 'tr', 'rendered_markdown'],
 | 
					                                knownHelpers: [
 | 
				
			||||||
                        preventIndent: true,
 | 
					                                    '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
 | 
					                // load fonts and files
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user