import { defineConfig } from 'vite'; // https://vitejs.dev/config export default defineConfig({ build: { rollupOptions: { // Externalize native Node modules — they're rebuilt by electron-forge external: [ 'better-sqlite3', 'keytar', '@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', }, }, }, });