adf877861d
Implement chapter templates, txt/md/docx import, submission export presets, and global inspiration shortcut. Split import handlers into a separate main bundle and fix EditorLayout setTarget loop that broke E2E. Co-authored-by: Cursor <cursoragent@cursor.com>
49 lines
1.1 KiB
TypeScript
49 lines
1.1 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')
|
|
},
|
|
external: ['mammoth', 'marked']
|
|
}
|
|
}
|
|
},
|
|
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')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|