Merge pull request #1395 from nikoferro/quiet-logs

issue #1022 - quiet logs on production mode
This commit is contained in:
Wyatt Johnson
2018-02-23 12:17:24 -07:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ function parseAssetURL() {
// Try to get the url from the canonical tag on the page.
return document.querySelector('link[rel="canonical"]').href;
} catch (e) {
console.warn(
window.console.warn(
'This page does not include a canonical link tag. Talk has inferred this asset_url from the window object. Query params have been stripped, which may cause a single thread to be present across multiple pages.'
);
+3 -1
View File
@@ -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,
},