Skip to content

How to remove console.log ,when vite build use esbuild? #7920

Answered by tatsunix
tomatobybike asked this question in Q&A
Discussion options

You must be logged in to vote
export default defineConfig({
    esbuild: {
      drop: ['console', 'debugger'],
    },
});

Replies: 5 comments 21 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
15 replies
@MrFlyHouse
Comment options

@bigsnowballhehe
Comment options

@blinpete
Comment options

@bigsnowballhehe
Comment options

@sashasashasasha151
Comment options

Answer selected by tomatobybike
Comment options

You must be logged in to vote
5 replies
@AlexTMjugador
Comment options

@MrFlyHouse
Comment options

@forgetso
Comment options

@forgetso
Comment options

@waruyama
Comment options

Comment options

You must be logged in to vote
1 reply
@forgetso
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet