fix: disable minification on server build (#1563)

This commit is contained in:
Nolan Lawson 2019-10-10 06:02:18 -07:00 committed by GitHub
parent a0251b20c5
commit 7dde0a833b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -2,7 +2,6 @@ const webpack = require('webpack')
const config = require('sapper/config/webpack.js') const config = require('sapper/config/webpack.js')
const pkg = require('../package.json') const pkg = require('../package.json')
const { mode, dev, resolve, inlineSvgs, allSvgs } = require('./shared.config') const { mode, dev, resolve, inlineSvgs, allSvgs } = require('./shared.config')
const terser = require('./terser.config')
// modules that the server should ignore, either because they cause errors or warnings // modules that the server should ignore, either because they cause errors or warnings
// (because they're only used on the client side) // (because they're only used on the client side)
@ -49,10 +48,7 @@ module.exports = {
hints: false // it doesn't matter if server.js is large hints: false // it doesn't matter if server.js is large
}, },
optimization: dev ? {} : { optimization: dev ? {} : {
minimize: !process.env.DEBUG, minimize: false
minimizer: [
terser()
]
}, },
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({