Skip to content

Commit

Permalink
perf: enable sourcemap in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Dec 1, 2023
1 parent a069bec commit 91f3fb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import createDebug from 'debug'
import { type BuildResult, type Plugin } from 'esbuild'
import path from 'node:path'
import colors from 'picocolors'
import { isDevelopment } from 'std-env'
import { globalConfig } from '../global-config'
import { type GlobalConfig } from '../global-config/GlobalConfigBuilder'
import { getContentHash, isBoolean, isInTest, pkgName } from '../helper/utils'
Expand Down Expand Up @@ -92,7 +93,7 @@ export async function esbuildTypescript(buildOptions: IBuildOptions) {
format: 'iife',
logLevel: 'silent',
minify: !!viteConfig.build.minify,
sourcemap: false,
sourcemap: isDevelopment ? 'inline' : false,
splitting: false,
treeShaking: true,
write: false,
Expand Down

0 comments on commit 91f3fb0

Please sign in to comment.