Merge pull request #2032 from overleaf/as-upgrade-webpack

Upgrade webpack to v4

GitOrigin-RevId: a92c487fee79c29c5314273bf05439c9dbb0ce4d
This commit is contained in:
Eric Mc Sween
2019-08-06 12:34:03 +00:00
committed by sharelatex
parent 2e20975f53
commit 2df7a8eaad
8 changed files with 3904 additions and 1492 deletions
+4 -19
View File
@@ -1,30 +1,15 @@
const path = require('path')
const webpack = require('webpack')
const merge = require('webpack-merge')
const base = require('./webpack.config')
module.exports = merge(base, {
mode: 'production',
devtool: false,
output: {
// Override output path to minjs dir
path: path.join(__dirname, '/public/minjs/es'),
},
plugins: [
// Use UglifyJS to minimise output
new webpack.optimize.UglifyJsPlugin({
// Enable compression (options here are UglifyJS options)
compress: {
drop_console: true, // Remove console logs
warnings: false // Silence Uglify warnings
},
output: {
comments: false // Remove comments
},
// Prevent source map files from being stripped out of bundle
sourceMap: true
})
]
path: path.join(__dirname, '/public/minjs/es')
}
})