Skip to content

Commit

Permalink
fix: remove ssg stdout listener, only stderr (#6387)
Browse files Browse the repository at this point in the history
Co-authored-by: Belinda Cao <[email protected]>
  • Loading branch information
zllkjc and caohuilin authored Oct 15, 2024
1 parent df1bed5 commit 983e802
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .changeset/strange-comics-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/plugin-ssg': patch
---

fix: remove ssg stdout listener, only stderr
fix: 移除 ssg 的 stdout 监听,只保留 stderr
11 changes: 0 additions & 11 deletions packages/cli/plugin-ssg/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, ' '));
}
});
});

0 comments on commit 983e802

Please sign in to comment.