From fca07d411c6b36d199315ecb9d9e53e825ccdce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E7=86=B1?= Date: Tue, 23 Dec 2025 21:37:32 +0800 Subject: [PATCH] chore(build): add WS_NO_BUFFER_UTIL environment variable to avoid optional dependency issue (#6370) --- common/shared/vite/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/shared/vite/index.ts b/common/shared/vite/index.ts index 4369ac1108..53e7efdba0 100644 --- a/common/shared/vite/index.ts +++ b/common/shared/vite/index.ts @@ -214,6 +214,8 @@ export async function build(options?: IBuildOptions) { define: { 'process.env.NODE_ENV': JSON.stringify('production'), 'process.env.BUILD_TIMESTAMP': JSON.stringify(Math.floor(Date.now() / 1000)), + // for ws package to avoid optional dependency issue + 'process.env.WS_NO_BUFFER_UTIL': JSON.stringify(true), }, plugins: [ trimClassNamePlugin(),