mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2025-01-09 14:12:05 -05:00
Tweak webpack config for consistency, avoid OOM crash
This commit is contained in:
parent
5517f9a184
commit
be95f54ffe
2 changed files with 22 additions and 24 deletions
|
@ -41,7 +41,8 @@ module.exports = {
|
|||
optimization: {
|
||||
// Use `--env.minify=false` to disable the UglifyJsPlugin instance automatically injected by electron-webpack.
|
||||
// Otherwise it will do double-duty with this one.
|
||||
minimizer: [new UglifyJsPlugin({
|
||||
minimizer: [
|
||||
new UglifyJsPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
sourceMap: true, // disable this if UglifyJSPlugin takes too long and/or runs out of memory
|
||||
|
@ -49,10 +50,8 @@ module.exports = {
|
|||
compress: isProduction ? {} : false,
|
||||
mangle: isProduction
|
||||
}
|
||||
})],
|
||||
splitChunks: {
|
||||
chunks: 'all'
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.SourceMapDevToolPlugin({
|
||||
|
|
|
@ -58,18 +58,17 @@ module.exports = {
|
|||
optimization: {
|
||||
// Use `--env.minify=false` to disable the UglifyJsPlugin instance automatically injected by electron-webpack.
|
||||
// Otherwise it will do double-duty with this one.
|
||||
minimizer: [new UglifyJsPlugin({
|
||||
minimizer: [
|
||||
new UglifyJsPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
sourceMap: false, // disable this if UglifyJSPlugin takes too long and/or runs out of memory
|
||||
sourceMap: true, // disable this if UglifyJSPlugin takes too long and/or runs out of memory
|
||||
uglifyOptions: {
|
||||
compress: isProduction ? {} : false,
|
||||
mangle: isProduction
|
||||
}
|
||||
})],
|
||||
splitChunks: {
|
||||
chunks: 'all'
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
|
|
Loading…
Reference in a new issue