Raise limit on code size before compacting (#4965)
This commit is contained in:
parent
16c84fb353
commit
db04f99124
@ -38,7 +38,7 @@ class Generator extends Printer {
|
|||||||
* Normalize generator options, setting defaults.
|
* Normalize generator options, setting defaults.
|
||||||
*
|
*
|
||||||
* - Detects code indentation.
|
* - Detects code indentation.
|
||||||
* - If `opts.compact = "auto"` and the code is over 100KB, `compact` will be set to `true`.
|
* - If `opts.compact = "auto"` and the code is over 500KB, `compact` will be set to `true`.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function normalizeOptions(code, opts, tokens): Format {
|
function normalizeOptions(code, opts, tokens): Format {
|
||||||
@ -78,10 +78,10 @@ function normalizeOptions(code, opts, tokens): Format {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (format.compact === "auto") {
|
if (format.compact === "auto") {
|
||||||
format.compact = code.length > 100000; // 100KB
|
format.compact = code.length > 500000; // 500KB
|
||||||
|
|
||||||
if (format.compact) {
|
if (format.compact) {
|
||||||
console.error("[BABEL] " + messages.get("codeGeneratorDeopt", opts.filename, "100KB"));
|
console.error("[BABEL] " + messages.get("codeGeneratorDeopt", opts.filename, "500KB"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user