From 083b8638e89a397d0557fb6cfb845a4360776029 Mon Sep 17 00:00:00 2001 From: Nicolas Ferro Date: Thu, 22 Feb 2018 19:17:26 -0300 Subject: [PATCH] issue #1022 - quiet logs on production mode --- webpack.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 193ebe65e..3a9ffcde5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -214,12 +214,14 @@ if (process.env.NODE_ENV === 'production') { toplevel: false, typeofs: false, unused: false, - // Switch off all types of compression except those needed to convince // react-devtools that we're using a production build conditionals: true, dead_code: true, evaluate: true, + // Remove warnings + discard any console.* functions + warnings: false, + drop_console: true }, mangle: true, }, @@ -353,7 +355,7 @@ module.exports = [ if (targets.length === 0) { throw new Error( `target plugin ${ - plugin.name + plugin.name } has no targets in it's target folder ${folder}` ); }