You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm putting logs in my code for debugging and logging. These logs are putted in every file, every function. I can simple build my app by ng build or ng build --prod. Problem is if I remove all logs from my app dist folder size can be decrease. I don't want to remove logs for debug environment, but I wan't to remove all logs file before build it.
I search about this problem, but I i did't get any proper solution.
Activity
devoto13 commentedon Jul 13, 2017
Maybe Angular itself will support it one day. See Igor's review for angular/angular#17399.
tmakin commentedon Jul 18, 2017
Whilst researching this issue I found the
drop_consoleoption in uglify js. I don't know how well it work, but it could be a super easy way to implement this.https://github.com/mishoo/UglifyJS2/blob/v2.x/README.md
I guess it would need to be passed into the webpack production config here:
angular-cli/packages/@angular/cli/models/webpack-configs/production.ts
Line 89 in 6764679
angular-automatic-lock-bot commentedon Sep 9, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.