diff --git a/src/auth.js b/src/auth.js index 613703ca3dc829df36ba15c0823db324ed7a02cc..17c3f74cebdf396c9382a3d5293c82473bfb5b25 100644 --- a/src/auth.js +++ b/src/auth.js @@ -55,6 +55,7 @@ export function checkAuthenticated() { return new Promise((resolve) => { if (APISession.authenticated) resolve(); else { + console.log(apiUrl); console.log('looking for token'); // let's see if we have a stored token const token = localStorage.get('token'); diff --git a/webpack.config.dev.js b/webpack.config.dev.js index e8d60b273e7dfce21e16ab82d655e7045bf7d5a5..c2c216729d78822e2edf2f51a01772be64e37e0d 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -1,8 +1,28 @@ -// Start with prod config -const config = require('./webpack.config.prod.js'); -// Replace prod with dev config +const webpack = require('webpack'); +const CompressionPlugin = require('compression-webpack-plugin'); + +// Start with dev config +const config = require('./webpack.config.js'); + +// Remove development server and code map +config.devServer = undefined; +config.devtool = ''; + +// Add optimization plugins +config.plugins = [ + new webpack.optimize.UglifyJsPlugin(), + new webpack.optimize.AggressiveMergingPlugin(), + new CompressionPlugin({ + asset: '[path].gz[query]', + algorithm: 'gzip', + test: /\.js$|\.css$|\.html$/, + threshold: 10240, + minRatio: 0.8, + }), +]; + +// Replace development with production config config.resolve.alias.networkConfig = `${__dirname}/src/networkConfig.dev.json`; -console.log(config.resolve.alias.networkConfig); module.exports = config;