fix: disable minification on server build (#1563)
This commit is contained in:
parent
a0251b20c5
commit
7dde0a833b
|
@ -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({
|
||||||
|
|
Loading…
Reference in New Issue