mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	webpack: Fix run-dev.py --minify.
‘--optimize-minimize’ no longer exists. (Webpack 5 has ‘--optimization-minimize’.) Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Anders Kaseorg
					
				
			
			
				
	
			
			
			
						parent
						
							17fe09bb6d
						
					
				
				
					commit
					9f3d1fdbdb
				
			@@ -20,7 +20,7 @@ const cacheLoader: webpack.RuleSetUseItem = {
 | 
			
		||||
    },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default (_env: unknown, argv: {mode?: string}): webpack.Configuration[] => {
 | 
			
		||||
export default (env: {minimize?: boolean} = {}, argv: {mode?: string}): webpack.Configuration[] => {
 | 
			
		||||
    const production: boolean = argv.mode === "production";
 | 
			
		||||
 | 
			
		||||
    const config: webpack.Configuration = {
 | 
			
		||||
@@ -177,6 +177,7 @@ export default (_env: unknown, argv: {mode?: string}): webpack.Configuration[] =
 | 
			
		||||
        // the source snippets with the eval-* options.
 | 
			
		||||
        devtool: production ? "source-map" : "cheap-module-source-map",
 | 
			
		||||
        optimization: {
 | 
			
		||||
            minimize: env.minimize ?? production,
 | 
			
		||||
            minimizer: [
 | 
			
		||||
                new CssMinimizerPlugin({
 | 
			
		||||
                    sourceMap: true,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user