Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console.warn should not be executed on production build #102

Open
0b5vr opened this issue Sep 12, 2019 · 1 comment
Open

console.warn should not be executed on production build #102

0b5vr opened this issue Sep 12, 2019 · 1 comment

Comments

@0b5vr
Copy link
Contributor

0b5vr commented Sep 12, 2019

できればlinterでもチェックできるようにしたい

@reminjp
Copy link
Contributor

reminjp commented Mar 7, 2020

linterが悩みどころですね……

素直に対応するならば

new webpack.DefinePlugin({ 'process.env': { NODE_ENV: mode } }),

を見て分岐させることになりますが……。

terser-webpack-plugin を通させて console.warn を除去するというアプローチがあるようですがオーバーキル感も。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants