fix: 更新 Electron 配置,优化输入输出设置;精简多语言文件中的 ESLint 描述

This commit is contained in:
DrSmoothl
2026-03-14 18:15:30 +08:00
parent 51f2455ee1
commit 58d16c6702
6 changed files with 14 additions and 15 deletions

View File

@@ -5,13 +5,15 @@ import path from 'path'
export default defineConfig({
main: {
entry: 'electron/main/index.ts',
build: {
target: 'node18',
lib: {
entry: 'electron/main/index.ts',
},
rollupOptions: {
input: {
index: path.resolve(__dirname, 'electron/main/index.ts'),
},
output: {
format: 'cjs',
},
external: ['electron', 'electron-store'],
},
},
@@ -22,11 +24,12 @@ export default defineConfig({
},
},
preload: {
entry: 'electron/preload/index.ts',
build: {
target: 'node18',
rollupOptions: {
input: path.resolve(__dirname, 'electron/preload/index.ts'),
input: {
index: path.resolve(__dirname, 'electron/preload/index.ts'),
},
output: {
entryFileNames: '[name].js',
format: 'cjs',