fix build regex?

This commit is contained in:
Andrew Pareles 2024-11-14 01:58:40 -08:00
parent b8f3182ee3
commit 799f6c2d16

View file

@ -18,13 +18,7 @@ export default defineConfig({
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: [ // 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('../../../*.js'