mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 02:20: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: {
|
build: {
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: ['@libsql/client', 'bufferutil', 'utf-8-validate', '@cherrystudio/mac-system-ocr'],
|
external: ['@libsql/client', 'bufferutil', 'utf-8-validate', '@cherrystudio/mac-system-ocr'],
|
||||||
output: {
|
output: isProd
|
||||||
manualChunks: undefined, // 彻底禁用代码分割 - 返回 null 强制单文件打包
|
? {
|
||||||
inlineDynamicImports: true // 内联所有动态导入,这是关键配置
|
manualChunks: undefined, // 彻底禁用代码分割 - 返回 null 强制单文件打包
|
||||||
}
|
inlineDynamicImports: true // 内联所有动态导入,这是关键配置
|
||||||
|
}
|
||||||
|
: undefined
|
||||||
},
|
},
|
||||||
sourcemap: isDev
|
sourcemap: isDev
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user