Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» chore(core): Drop console.log when compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
duckception committed Jan 9, 2024
1 parent b4c122a commit cb33f0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/cli/compileWalletSetupFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export async function compileWalletSetupFunctions(walletSetupDir: string, debug:
)
}

// TODO: In this step, modify `console.log` so it prints from which file the log is coming from.
await build({
name: 'cli-build',
silent: true,
Expand All @@ -44,6 +43,11 @@ export async function compileWalletSetupFunctions(walletSetupDir: string, debug:
external: ['@synthetixio/synpress', '@playwright/test', 'playwright-core', 'esbuild', 'tsup'],
banner: {
js: FIXES_BANNER
},
esbuildOptions(options) {
// TODO: In this step, if the debug file is present, we should modify `console.log` so it prints from which file the log is coming from.
// We're dropping `console.log` and `debugger` statements because they do not play nicely with the Playwright Test Runner.
options.drop = debug ? [] : ['console', 'debugger']
}
})

Expand Down

0 comments on commit cb33f0c

Please sign in to comment.