Respect the jsescOption.minimal generator option (#12755)

This commit is contained in:
Nicolò Ribaudo
2021-02-04 16:45:02 +01:00
committed by GitHub
parent a0e3ef2117
commit 77d46bcb1a
2 changed files with 25 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ function normalizeOptions(code, opts): Format {
jsescOption: {
quotes: "double",
wrap: true,
minimal: true,
minimal: process.env.BABEL_8_BREAKING ? true : false,
...opts.jsescOption,
},
recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType,
@@ -66,7 +66,6 @@ function normalizeOptions(code, opts): Format {
if (!process.env.BABEL_8_BREAKING) {
format.jsonCompatibleStrings = opts.jsonCompatibleStrings;
delete format.jsescOption.minimal;
}
if (format.minified) {