|
|
@ -2,10 +2,11 @@ const Uglify = require('uglifyjs-webpack-plugin')
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
module.exports = {
|
|
|
|
// TODO remove `next.configs.js` when this closes: https://github.com/zeit/next.js/issues/1195
|
|
|
|
// TODO remove `next.configs.js` when this closes: https://github.com/zeit/next.js/issues/1195
|
|
|
|
webpack: function(c) {
|
|
|
|
webpack: function(c, { dev }) {
|
|
|
|
|
|
|
|
if (!dev) {
|
|
|
|
c.plugins = c.plugins.filter(plugin => plugin.constructor.name !== 'UglifyJsPlugin')
|
|
|
|
c.plugins = c.plugins.filter(plugin => plugin.constructor.name !== 'UglifyJsPlugin')
|
|
|
|
|
|
|
|
|
|
|
|
c.plugins.push(new Uglify())
|
|
|
|
c.plugins.push(new Uglify())
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return c
|
|
|
|
return c
|
|
|
|
}
|
|
|
|
}
|
|
|
|