diff --git a/routes/_components/Timeline.html b/routes/_components/Timeline.html index 05dab511..eff81eca 100644 --- a/routes/_components/Timeline.html +++ b/routes/_components/Timeline.html @@ -119,9 +119,7 @@ stop('onScrollToBottom') }, addStatuses(newStatuses) { - if (process.env.NODE_ENV !== 'production') { - console.log('addStatuses()') - } + console.log('addStatuses()') let instanceName = this.store.get('currentInstance') let timeline = this.get('timeline') let statusIds = this.get('statusIds') diff --git a/routes/_components/virtualList/VirtualListContainer.html b/routes/_components/virtualList/VirtualListContainer.html index 9b7231f7..d67fc24b 100644 --- a/routes/_components/virtualList/VirtualListContainer.html +++ b/routes/_components/virtualList/VirtualListContainer.html @@ -22,16 +22,12 @@ let scrollTop = this.store.get('scrollTop') if (scrollTop > 0) { this.observe('allVisibleItemsHaveHeight', allVisibleItemsHaveHeight => { - if (process.env.NODE_ENV !== 'production') { - console.log('allVisibleItemsHaveHeight', allVisibleItemsHaveHeight) - } + console.log('allVisibleItemsHaveHeight', allVisibleItemsHaveHeight) if (!this.get('initializedScrollTop') && allVisibleItemsHaveHeight && node) { this.set({'initializedScrollTop': true}) requestAnimationFrame(() => { mark('set scrollTop') - if (process.env.NODE_ENV !== 'production') { - console.log('forcing scroll top to ', scrollTop) - } + console.log('forcing scroll top to ', scrollTop) node.scrollTop = scrollTop stop('set scrollTop') }) @@ -88,9 +84,7 @@ }, onFullscreenChange() { mark('onFullscreenChange') - if (process.env.NODE_ENV !== 'production') { - console.log('is fullscreen? ', isFullscreen()) - } + console.log('is fullscreen? ', isFullscreen()) this.set({ fullscreen: isFullscreen() }) stop('onFullscreenChange') } diff --git a/routes/_utils/database/databaseLifecycle.js b/routes/_utils/database/databaseLifecycle.js index 81f73afd..61dbd9cd 100644 --- a/routes/_utils/database/databaseLifecycle.js +++ b/routes/_utils/database/databaseLifecycle.js @@ -9,8 +9,7 @@ import { } from './constants' export function getDatabase(instanceName) { - if (!instanceName && process.env.NODE_ENV !== 'production') { - console.trace() + if (!instanceName) { throw new Error('instanceName is undefined in getDatabase()') } if (databaseCache[instanceName]) { diff --git a/routes/settings/instances/add.html b/routes/settings/instances/add.html index 30f5034b..f1b0d583 100644 --- a/routes/settings/instances/add.html +++ b/routes/settings/instances/add.html @@ -106,9 +106,7 @@ try { await this.redirectToOauth() } catch (err) { - if (process.env.NODE_ENV !== 'production') { - console.error(err) - } + console.error(err) let error = `${err.message || err.name}. ` + (navigator.onLine ? `Is this a valid Mastodon instance?` : diff --git a/webpack.client.config.js b/webpack.client.config.js index 9a140468..5c30dff8 100644 --- a/webpack.client.config.js +++ b/webpack.client.config.js @@ -68,7 +68,15 @@ module.exports = { //new ExtractTextPlugin('main.css'), new LodashModuleReplacementPlugin(), new webpack.optimize.ModuleConcatenationPlugin(), - new UglifyJSPlugin(), + new UglifyJSPlugin({ + parallel: true, + uglifyOptions: { + comments: false, + compress: { + drop_console: true + } + } + }), new BundleAnalyzerPlugin({ // generates report.html and stats.json analyzerMode: 'static', generateStatsFile: true,