From f4fb9414ce479306f0e5a45ccbae66ce7eb068bb Mon Sep 17 00:00:00 2001 From: kongjiacong Date: Tue, 15 Oct 2024 15:17:23 +0800 Subject: [PATCH 1/2] fix: remove ssg stdout listener, only stderr --- packages/cli/plugin-ssg/src/server/index.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/cli/plugin-ssg/src/server/index.ts b/packages/cli/plugin-ssg/src/server/index.ts index 5f9d4cd9e7af..18ea3bed61f7 100644 --- a/packages/cli/plugin-ssg/src/server/index.ts +++ b/packages/cli/plugin-ssg/src/server/index.ts @@ -87,15 +87,4 @@ export const createServer = ( logger.info(str.replace(/[^\S\n]+/g, ' ')); } }); - - cp.stdout?.on('data', chunk => { - const str = chunk.toString(); - if (str.includes('Error')) { - logger.error(str); - reject(new Error('ssg render failed')); - cp.kill('SIGKILL'); - } else { - logger.info(str.replace(/[^\S\n]+/g, ' ')); - } - }); }); From 57c32b54523075d74305b7875ce858c53d1c08e5 Mon Sep 17 00:00:00 2001 From: kongjiacong Date: Tue, 15 Oct 2024 15:46:16 +0800 Subject: [PATCH 2/2] docs: add changeset --- .changeset/strange-comics-collect.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/strange-comics-collect.md diff --git a/.changeset/strange-comics-collect.md b/.changeset/strange-comics-collect.md new file mode 100644 index 000000000000..9c234da7bfc4 --- /dev/null +++ b/.changeset/strange-comics-collect.md @@ -0,0 +1,6 @@ +--- +'@modern-js/plugin-ssg': patch +--- + +fix: remove ssg stdout listener, only stderr +fix: 移除 ssg 的 stdout 监听,只保留 stderr