Skip to content

Commit

Permalink
fix: prefix terser log with name (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jun 16, 2023
1 parent 68297f7 commit 2f41663
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ export async function build(_options: Options) {
minifyOptions: options.minify,
format,
terserOptions: options.terserOptions,
logger,
}),
])
await runEsbuild(options, {
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/terser.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { MinifyOptions } from 'terser'
import { PrettyError } from '../errors'
import { createLogger } from '../log'
import { Logger } from '../log'
import { Format, Options } from '../options'
import { Plugin } from '../plugin'
import { localRequire } from '../utils'

const logger = createLogger()

export const terserPlugin = ({
minifyOptions,
format,
terserOptions = {},
logger
}: {
minifyOptions: Options['minify']
format: Format
terserOptions?: MinifyOptions
terserOptions?: MinifyOptions,
logger: Logger
}): Plugin => {
return {
name: 'terser',
Expand Down

0 comments on commit 2f41663

Please sign in to comment.