From 233e1f13cf1eee77f26c4d8904a28f129de59192 Mon Sep 17 00:00:00 2001 From: Clark Alesna Date: Wed, 25 Sep 2024 05:01:07 +0800 Subject: [PATCH] fix: for node js esm build, we don't bundle anymore --- tsup.config.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tsup.config.ts b/tsup.config.ts index 624541f..da87653 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -41,8 +41,7 @@ export default defineConfig((options) => { options.mainFields = ['module', 'main'] } }, - noExternal: ['@connectrpc/connect', '@connectrpc/connect-web', '@connectrpc/connect-node'], - treeshake: true, + noExternal: isBrowser ? ['@connectrpc/connect', '@connectrpc/connect-web', '@connectrpc/connect-node'] : [], sourcemap: true, tsconfig: path.resolve(rootDir, 'tsconfig.json'), }