[babel 8] Output minimal strings by default (#12675)
Co-authored-by: Justin Ridgewell <justin@ridgewell.name> Co-authored-by: Justin Ridgewell <jridgewell@google.com>
This commit is contained in:
@@ -203,8 +203,6 @@ export function StringLiteral(node: Object) {
|
||||
return;
|
||||
}
|
||||
|
||||
// ensure the output is ASCII-safe
|
||||
|
||||
const val = jsesc(
|
||||
node.value,
|
||||
process.env.BABEL_8_BREAKING
|
||||
|
||||
@@ -55,6 +55,7 @@ function normalizeOptions(code, opts): Format {
|
||||
jsescOption: {
|
||||
quotes: "double",
|
||||
wrap: true,
|
||||
minimal: true,
|
||||
...opts.jsescOption,
|
||||
},
|
||||
recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType,
|
||||
@@ -62,6 +63,7 @@ function normalizeOptions(code, opts): Format {
|
||||
|
||||
if (!process.env.BABEL_8_BREAKING) {
|
||||
format.jsonCompatibleStrings = opts.jsonCompatibleStrings;
|
||||
delete format.jsescOption.minimal;
|
||||
}
|
||||
|
||||
if (format.minified) {
|
||||
|
||||
Reference in New Issue
Block a user