a4412793f4
Introduce pack-bootstrap chunk, ZipArchive-based PackService with progress IPC, book registry import helpers, and IT-PACK-01 / IT-ALL-02 integration tests. Co-authored-by: Cursor <cursoragent@cursor.com>
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import { resolve } from 'path'
|
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
main: {
|
|
plugins: [externalizeDepsPlugin()],
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
index: resolve(__dirname, 'src/main/index.ts'),
|
|
'import-bootstrap': resolve(__dirname, 'src/main/import-bootstrap.ts'),
|
|
'pack-bootstrap': resolve(__dirname, 'src/main/pack-bootstrap.ts')
|
|
},
|
|
external: ['mammoth', 'marked', 'archiver', 'extract-zip']
|
|
}
|
|
}
|
|
},
|
|
preload: {
|
|
plugins: [externalizeDepsPlugin()],
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
index: resolve(__dirname, 'src/preload/index.ts')
|
|
},
|
|
output: {
|
|
format: 'cjs',
|
|
entryFileNames: '[name].js'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
renderer: {
|
|
resolve: {
|
|
alias: {
|
|
'@shared': resolve('src/shared'),
|
|
'@renderer': resolve('src/renderer')
|
|
}
|
|
},
|
|
plugins: [react()],
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
index: resolve(__dirname, 'src/renderer/index.html')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|