Skip to content

Commit

Permalink
💄Prettiers
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Nov 14, 2022
1 parent 5815826 commit 4491a19
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 47 deletions.
4 changes: 2 additions & 2 deletions src/webviews/apps/plus/graph/graph.tsx
Expand Up @@ -14,7 +14,7 @@ import type {
GraphRepository,
InternalNotificationType,
State,
UpdateStateCallback
UpdateStateCallback,
} from '../../../../plus/webviews/graph/protocol';
import {
DidChangeAvatarsNotificationType,
Expand Down Expand Up @@ -95,7 +95,7 @@ export class GraphApp extends App<State> {
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)}
Expand Down
93 changes: 48 additions & 45 deletions webpack.config.js
Expand Up @@ -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: [
Expand Down

0 comments on commit 4491a19

Please sign in to comment.