33 lines
812 B
TypeScript
33 lines
812 B
TypeScript
import { defineConfig } from 'vite';
|
|
import path from 'path';
|
|
|
|
// https://vitejs.dev/config
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@shared': path.resolve(__dirname, './src/shared'),
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
// Externalize native Node modules — they're rebuilt by electron-forge
|
|
external: [
|
|
'better-sqlite3',
|
|
'@github/copilot-sdk',
|
|
'@github/copilot',
|
|
// LangChain — externalize to avoid bundling Node.js-specific code
|
|
'@langchain/core',
|
|
'@langchain/langgraph',
|
|
'@langchain/openai',
|
|
'@langchain/anthropic',
|
|
'@langchain/langgraph-checkpoint',
|
|
'@langchain/langgraph-sdk',
|
|
'vectordb',
|
|
],
|
|
output: {
|
|
entryFileNames: 'main.js',
|
|
},
|
|
},
|
|
},
|
|
});
|