mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Merge pull request #2032 from overleaf/as-upgrade-webpack
Upgrade webpack to v4 GitOrigin-RevId: a92c487fee79c29c5314273bf05439c9dbb0ce4d
This commit is contained in:
committed by
sharelatex
parent
2e20975f53
commit
2df7a8eaad
@@ -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')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user