chore(electron.vite.config): update Rollup configuration for single file packaging (#7183)

- Modified the Rollup options to disable code splitting and enable inline dynamic imports, ensuring a single file output for the build process. This change optimizes the packaging of the Electron application.
This commit is contained in:
beyondkmp 2025-06-14 10:01:47 +08:00 committed by GitHub
parent afc4731b9d
commit f5e1885ffa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,13 @@ export default defineConfig({
}, },
build: { build: {
rollupOptions: { rollupOptions: {
external: ['@libsql/client', 'bufferutil', 'utf-8-validate'] external: ['@libsql/client', 'bufferutil', 'utf-8-validate'],
output: {
// 彻底禁用代码分割 - 返回 null 强制单文件打包
manualChunks: undefined,
// 内联所有动态导入,这是关键配置
inlineDynamicImports: true
}
}, },
sourcemap: process.env.NODE_ENV === 'development' sourcemap: process.env.NODE_ENV === 'development'
}, },