From 73d86fe768d3f798741155821f096a33b8e1d870 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Tue, 9 Aug 2022 22:24:42 +0800 Subject: [PATCH] chore: Reduce debug logs (#14806) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * improve * improve * Update babel.config.js Co-authored-by: Huáng Jùnliàng --- babel-worker.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/babel-worker.cjs b/babel-worker.cjs index 8997520e74fe..e2978a5ac777 100644 --- a/babel-worker.cjs +++ b/babel-worker.cjs @@ -1,4 +1,4 @@ -const { transformAsync } = require("@babel/core"); +const { transformSync } = require("@babel/core"); const { mkdirSync, statSync, readFileSync, writeFileSync } = require("fs"); const { dirname } = require("path"); const fancyLog = require("fancy-log"); @@ -32,7 +32,7 @@ exports.transform = async function transform(src, dest) { } fancyLog(`Compiling '${chalk.cyan(src)}'...`); const content = readFileSync(src, { encoding: "utf8" }); - const { code } = await transformAsync(content, { + const { code } = transformSync(content, { filename: src, caller: { // We have wrapped packages/babel-core/src/config/files/configuration.js with feature detection