From 2086f1d32df697dbf407b8a8cba0537dc99ad478 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Mon, 21 Jul 2025 12:22:32 +0900 Subject: [PATCH 1/2] test(rsc): remove global unhandled error handlers --- .../plugin-rsc/examples/basic/vite.config.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/plugin-rsc/examples/basic/vite.config.ts b/packages/plugin-rsc/examples/basic/vite.config.ts index 35e31d2ab..f26eb4546 100644 --- a/packages/plugin-rsc/examples/basic/vite.config.ts +++ b/packages/plugin-rsc/examples/basic/vite.config.ts @@ -7,15 +7,15 @@ import inspect from 'vite-plugin-inspect' import path from 'node:path' // log unhandled rejection to debug e2e failures -if (!(globalThis as any).__debugHandlerRegisterd) { - process.on('uncaughtException', (err) => { - console.error('⚠️⚠️⚠️ uncaughtException ⚠️⚠️⚠️', err) - }) - process.on('unhandledRejection', (err) => { - console.error('⚠️⚠️⚠️ unhandledRejection ⚠️⚠️⚠️', err) - }) - ;(globalThis as any).__debugHandlerRegisterd = true -} +// if (!(globalThis as any).__debugHandlerRegisterd) { +// process.on('uncaughtException', (err) => { +// console.error('⚠️⚠️⚠️ uncaughtException ⚠️⚠️⚠️', err) +// }) +// process.on('unhandledRejection', (err) => { +// console.error('⚠️⚠️⚠️ unhandledRejection ⚠️⚠️⚠️', err) +// }) +// ;(globalThis as any).__debugHandlerRegisterd = true +// } export default defineConfig({ base: process.env.TEST_BASE ? '/custom-base/' : undefined, From fd54b9436315cb021eca1492e5647f9fe9a85a71 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Mon, 21 Jul 2025 12:41:09 +0900 Subject: [PATCH 2/2] chore: cleanup --- packages/plugin-rsc/examples/basic/vite.config.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/plugin-rsc/examples/basic/vite.config.ts b/packages/plugin-rsc/examples/basic/vite.config.ts index f26eb4546..7bd492542 100644 --- a/packages/plugin-rsc/examples/basic/vite.config.ts +++ b/packages/plugin-rsc/examples/basic/vite.config.ts @@ -6,17 +6,6 @@ import { type Plugin, defineConfig, normalizePath, parseAstAsync } from 'vite' import inspect from 'vite-plugin-inspect' import path from 'node:path' -// log unhandled rejection to debug e2e failures -// if (!(globalThis as any).__debugHandlerRegisterd) { -// process.on('uncaughtException', (err) => { -// console.error('⚠️⚠️⚠️ uncaughtException ⚠️⚠️⚠️', err) -// }) -// process.on('unhandledRejection', (err) => { -// console.error('⚠️⚠️⚠️ unhandledRejection ⚠️⚠️⚠️', err) -// }) -// ;(globalThis as any).__debugHandlerRegisterd = true -// } - export default defineConfig({ base: process.env.TEST_BASE ? '/custom-base/' : undefined, clearScreen: false,