From bd49aaffde2baa8ee468330f95f3941046ff992b Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Thu, 14 Nov 2024 01:06:15 -0800 Subject: [PATCH] update noExternal --- .../react/src/util/{posthog.ts => posthog.tsx} | 0 .../util/{sendLLMMessage.ts => sendLLMMessage.tsx} | 0 .../contrib/void/browser/react/tsconfig.json | 3 ++- .../contrib/void/browser/react/tsup.config.js | 14 +++++++++++--- 4 files changed, 13 insertions(+), 4 deletions(-) rename src/vs/workbench/contrib/void/browser/react/src/util/{posthog.ts => posthog.tsx} (100%) rename src/vs/workbench/contrib/void/browser/react/src/util/{sendLLMMessage.ts => sendLLMMessage.tsx} (100%) diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/posthog.ts b/src/vs/workbench/contrib/void/browser/react/src/util/posthog.tsx similarity index 100% rename from src/vs/workbench/contrib/void/browser/react/src/util/posthog.ts rename to src/vs/workbench/contrib/void/browser/react/src/util/posthog.tsx diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/sendLLMMessage.ts b/src/vs/workbench/contrib/void/browser/react/src/util/sendLLMMessage.tsx similarity index 100% rename from src/vs/workbench/contrib/void/browser/react/src/util/sendLLMMessage.ts rename to src/vs/workbench/contrib/void/browser/react/src/util/sendLLMMessage.tsx diff --git a/src/vs/workbench/contrib/void/browser/react/tsconfig.json b/src/vs/workbench/contrib/void/browser/react/tsconfig.json index 22af6ba3..8568ca68 100644 --- a/src/vs/workbench/contrib/void/browser/react/tsconfig.json +++ b/src/vs/workbench/contrib/void/browser/react/tsconfig.json @@ -6,6 +6,7 @@ "esModuleInterop": true, }, "include": [ - "./src/**/*.ts" + "./src/**/*.ts", + "./src/**/*.tsx" ] } diff --git a/src/vs/workbench/contrib/void/browser/react/tsup.config.js b/src/vs/workbench/contrib/void/browser/react/tsup.config.js index a171e9dc..1509177e 100644 --- a/src/vs/workbench/contrib/void/browser/react/tsup.config.js +++ b/src/vs/workbench/contrib/void/browser/react/tsup.config.js @@ -3,8 +3,8 @@ import { defineConfig } from 'tsup' export default defineConfig({ entry: [ './src2/sidebar-tsx/Sidebar.tsx', - './src2/util/sendLLMMessage.ts', - './src2/util/posthog.ts', + './src2/util/sendLLMMessage.tsx', + './src2/util/posthog.tsx', ], outDir: './out', format: ['esm'], @@ -17,7 +17,15 @@ export default defineConfig({ injectStyle: true, // bundle css into the output file outExtension: () => ({ js: '.js' }), // default behavior is to take local files and make them internal (bundle them) and take imports like 'react' and leave them external (don't bundle them), we want the opposite in many ways - noExternal: ['react', 'react-dom'], // noExternal means we should take these things and make them not external (bundle them into the output file) + noExternal: [ // noExternal means we should take these things and make them not external (bundle them into the output file) + 'react', + 'react-dom', + 'posthog-js', + '@google/generative-ai', + 'ollama', + '@anthropic-ai/sdk', + 'openai', + ], external: [ // these imports should be kept external ../../../ are external (this is just an optimization so the output file doesn't re-implement functions) new RegExp('../../../*' .replaceAll('.', '\\.')