Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Commit 89f37e4

Browse files
author
evilebottnawi
committed
fix: disable inline optimization by default
1 parent 3ca5eaf commit 89f37e4

File tree

6 files changed

+256
-214
lines changed

6 files changed

+256
-214
lines changed

src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class UglifyJsPlugin {
4242
include,
4343
exclude,
4444
uglifyOptions: {
45+
compress: {
46+
inline: false,
47+
},
4548
output: {
4649
comments: extractComments ? false : /^\**!|@preserve|@license|@cc_on/,
4750
},

src/uglify/minify.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,23 @@ const buildUglifyOptions = ({
2121
} = {}) => ({
2222
ecma,
2323
warnings,
24-
parse,
25-
compress,
26-
mangle: mangle == null ? true : mangle,
24+
parse: {
25+
...parse,
26+
},
27+
compress: {
28+
...compress,
29+
},
30+
mangle: mangle == null ? true : {
31+
...mangle,
32+
},
2733
output: {
2834
shebang: true,
2935
comments: false,
3036
beautify: false,
3137
semicolons: true,
3238
...output,
3339
},
34-
// Ignoring sourcemap from options
40+
// Ignoring sourceMap from options
3541
sourceMap: null,
3642
toplevel,
3743
nameCache,

0 commit comments

Comments
 (0)