Skip to content

Commit

Permalink
refactor and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
char8x committed Oct 25, 2024
1 parent be61e6a commit 1d19db7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/utils/transform/get-esbuild-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ export const baseConfig = Object.freeze({
loader: 'default',
});

const isNodeDebuggerEnabled = process.execArgv.some((flag) => {
// match Node.js debugger flags
// https://nodejs.org/api/cli.html#--inspecthostport
const NODE_DEBUGGER_FLAG_REGEX = /^--inspect(?:-brk|-port|-publish-uid|-wait)?(?:=|$)/;

// match Node.js debugger flags
// https://nodejs.org/api/cli.html#--inspecthostport
return /--inspect(-brk|-port|-publish-uid|-wait)?/.test(flag)
})
const isNodeDebuggerEnabled = process.execArgv.some(flag => NODE_DEBUGGER_FLAG_REGEX.test(flag));

export const cacheConfig = {
...baseConfig,
Expand Down

0 comments on commit 1d19db7

Please sign in to comment.