mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
update noExternal
This commit is contained in:
parent
13f6fd5c66
commit
bd49aaffde
4 changed files with 13 additions and 4 deletions
|
|
@ -6,6 +6,7 @@
|
|||
"esModuleInterop": true,
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*.ts"
|
||||
"./src/**/*.ts",
|
||||
"./src/**/*.tsx"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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('.', '\\.')
|
||||
|
|
|
|||
Loading…
Reference in a new issue