FIx lint errors

This commit is contained in:
chrisgarrity 2018-03-09 08:49:56 -05:00 committed by Ray Schamp
parent 79665e5986
commit 37437636ff
2 changed files with 16 additions and 15 deletions

View file

@ -6,7 +6,8 @@ var webpack = require('webpack');
var compiler = webpack(require('../webpack.config.js')); var compiler = webpack(require('../webpack.config.js'));
var handler = require('./handler'); var handler = require('./handler');
var log = require('./log'); var log = require('./log');
var routes = require('../src/routes.json').concat(require('../src/routes-dev.json')).filter(route => !process.env.VIEW || process.env.VIEW === route.view); var routes = require('../src/routes.json').concat(require('../src/routes-dev.json'))
.filter(route => !process.env.VIEW || process.env.VIEW === route.view);
// Create server // Create server
var app = express(); var app = express();

View file

@ -142,7 +142,14 @@ module.exports = {
new CopyWebpackPlugin([ new CopyWebpackPlugin([
{from: 'static'}, {from: 'static'},
{from: 'intl', to: 'js'} {from: 'intl', to: 'js'}
]), ])
])
.concat(process.env.NODE_ENV === 'production' ? [
new webpack.optimize.UglifyJsPlugin({
sourceMap: true
})
] : [])
.concat([
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"', 'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"',
'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"', 'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"',
@ -154,11 +161,4 @@ module.exports = {
filename: 'js/common.bundle.js' filename: 'js/common.bundle.js'
}) })
]) ])
.concat(process.env.NODE_ENV === 'production' ? [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
] : [])
}; };