feat: 解码 worker 化、Playwright E2E 测试体系与文件夹对比(0.6.0)
This commit is contained in:
+15
-2
@@ -4,9 +4,22 @@ import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig({
|
||||
main: {
|
||||
plugins: [externalizeDepsPlugin()],
|
||||
// iconv-lite 打包进产物:解码 worker 随 asarUnpack 加载,unpacked 路径下无法
|
||||
// 解析 asar 内的 node_modules(Electron 的 asar 补丁不覆盖 worker 线程)
|
||||
plugins: [externalizeDepsPlugin({ exclude: ['iconv-lite'] })],
|
||||
build: {
|
||||
sourcemap: false
|
||||
sourcemap: false,
|
||||
rollupOptions: {
|
||||
// 双入口:主进程 + 解码 worker(worker_threads 无法加载 asar 内脚本,需单独产物)
|
||||
input: {
|
||||
index: resolve('src/main/index.ts'),
|
||||
decodeWorker: resolve('src/main/decodeWorker.ts')
|
||||
},
|
||||
output: {
|
||||
entryFileNames: '[name].js',
|
||||
format: 'cjs'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
preload: {
|
||||
|
||||
Reference in New Issue
Block a user