mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 06:30:10 +08:00
fix(electron): conditionally set Rollup output options based on production environment
This commit is contained in:
parent
6f73e93e9b
commit
1a1c7bb604
@ -25,10 +25,12 @@ export default defineConfig({
|
||||
build: {
|
||||
rollupOptions: {
|
||||
external: ['@libsql/client', 'bufferutil', 'utf-8-validate', '@cherrystudio/mac-system-ocr'],
|
||||
output: {
|
||||
manualChunks: undefined, // 彻底禁用代码分割 - 返回 null 强制单文件打包
|
||||
inlineDynamicImports: true // 内联所有动态导入,这是关键配置
|
||||
}
|
||||
output: isProd
|
||||
? {
|
||||
manualChunks: undefined, // 彻底禁用代码分割 - 返回 null 强制单文件打包
|
||||
inlineDynamicImports: true // 内联所有动态导入,这是关键配置
|
||||
}
|
||||
: undefined
|
||||
},
|
||||
sourcemap: isDev
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user