feat: 解码 worker 化、Playwright E2E 测试体系与文件夹对比(0.6.0)

This commit is contained in:
2026-08-18 14:40:44 +08:00
parent 2b43b5e676
commit be619c2377
24 changed files with 2030 additions and 151 deletions
+15 -2
View File
@@ -4,9 +4,22 @@ import react from '@vitejs/plugin-react'
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
// iconv-lite 打包进产物:解码 worker 随 asarUnpack 加载,unpacked 路径下无法
// 解析 asar 内的 node_modulesElectron 的 asar 补丁不覆盖 worker 线程)
plugins: [externalizeDepsPlugin({ exclude: ['iconv-lite'] })],
build: {
sourcemap: false
sourcemap: false,
rollupOptions: {
// 双入口:主进程 + 解码 workerworker_threads 无法加载 asar 内脚本,需单独产物)
input: {
index: resolve('src/main/index.ts'),
decodeWorker: resolve('src/main/decodeWorker.ts')
},
output: {
entryFileNames: '[name].js',
format: 'cjs'
}
}
}
},
preload: {