Skip to content
Discussion options

You must be logged in to vote

Hello.

You could enable it depending on the NODE_ENV value.

module.exports = {
  compiler: {
    removeConsole: process.env.NODE_ENV === "production",
  },
};

will remove console.* when doing yarn build but will still keep them on yarn dev.

Replies: 5 comments 6 replies

Comment options

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

@thibautsabot
Comment options

@adelpro
Comment options

@AryanJ-NYC
Comment options

@programming-with-ia
Comment options

Answer selected by sunglee
Comment options

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

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
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
10 participants