From 4491a1902fdd707e8be007009b1f3c1d28989b52 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 14 Nov 2022 16:58:42 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84Prettiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/webviews/apps/plus/graph/graph.tsx | 4 +- webpack.config.js | 93 +++++++++++++------------- 2 files changed, 50 insertions(+), 47 deletions(-) diff --git a/src/webviews/apps/plus/graph/graph.tsx b/src/webviews/apps/plus/graph/graph.tsx index 3ae3c8aac26dc..a62992173eb0f 100644 --- a/src/webviews/apps/plus/graph/graph.tsx +++ b/src/webviews/apps/plus/graph/graph.tsx @@ -14,7 +14,7 @@ import type { GraphRepository, InternalNotificationType, State, - UpdateStateCallback + UpdateStateCallback, } from '../../../../plus/webviews/graph/protocol'; import { DidChangeAvatarsNotificationType, @@ -95,7 +95,7 @@ export class GraphApp extends App { path => this.onRepositorySelectionChanged(path), 250, )} - onDoubleClickRef={(ref) => this.onDoubleClickRef(ref)} + onDoubleClickRef={ref => this.onDoubleClickRef(ref)} onMissingAvatars={(...params) => this.onGetMissingAvatars(...params)} onMissingRefsMetadata={(...params) => this.onGetMissingRefsMetadata(...params)} onMoreRows={(...params) => this.onGetMoreRows(...params)} diff --git a/webpack.config.js b/webpack.config.js index 897c8afc28e12..c377c29ee23a6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -354,52 +354,55 @@ function getWebviewsConfig(mode, env) { publicPath: '#{root}/dist/webviews/', }, optimization: { - minimizer: mode === 'production' ? [ - new TerserPlugin( - env.esbuild - ? { - minify: TerserPlugin.esbuildMinify, - terserOptions: { - // @ts-ignore - drop: ['debugger', 'console'], - // @ts-ignore - format: 'esm', - minify: true, - treeShaking: true, - // // Keep the class names otherwise @log won't provide a useful name - // keepNames: true, - target: 'es2020', - }, - } - : { - extractComments: false, - parallel: true, - // @ts-ignore - terserOptions: { - compress: { - drop_debugger: true, - drop_console: true, - }, - ecma: 2020, - // // Keep the class names otherwise @log won't provide a useful name - // keep_classnames: true, - module: true, + minimizer: + mode === 'production' + ? [ + new TerserPlugin( + env.esbuild + ? { + minify: TerserPlugin.esbuildMinify, + terserOptions: { + // @ts-ignore + drop: ['debugger', 'console'], + // @ts-ignore + format: 'esm', + minify: true, + treeShaking: true, + // // Keep the class names otherwise @log won't provide a useful name + // keepNames: true, + target: 'es2020', + }, + } + : { + extractComments: false, + parallel: true, + // @ts-ignore + terserOptions: { + compress: { + drop_debugger: true, + drop_console: true, + }, + ecma: 2020, + // // Keep the class names otherwise @log won't provide a useful name + // keep_classnames: true, + module: true, + }, + }, + ), + new ImageMinimizerPlugin({ + deleteOriginalAssets: true, + generator: [imageGeneratorConfig], + }), + new CssMinimizerPlugin({ + minimizerOptions: { + preset: [ + 'cssnano-preset-advanced', + { discardUnused: false, mergeIdents: false, reduceIdents: false }, + ], }, - }, - ), - new ImageMinimizerPlugin({ - deleteOriginalAssets: true, - generator: [imageGeneratorConfig], - }), - new CssMinimizerPlugin({ - minimizerOptions: { - preset: [ - 'cssnano-preset-advanced', - { discardUnused: false, mergeIdents: false, reduceIdents: false }, - ], - }, - }), - ] : [], + }), + ] + : [], }, module: { rules: [