feat: 打包配置问题修复

This commit is contained in:
duanshuwen
2026-03-16 22:07:59 +08:00
parent 2fc8ad3140
commit 67850c63f7
3 changed files with 4 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ import * as path from 'path';
const config: ForgeConfig = {
packagerConfig: {
asar: true,
tmpdir: path.resolve(process.cwd(), '..', 'electron-packager-tmp'),
},
rebuildConfig: {},
makers: [
@@ -70,8 +71,8 @@ const config: ForgeConfig = {
},
async preMake() {
const outDir = path.resolve(process.cwd(), 'out');
fs.rmSync(outDir, { recursive: true, force: true });
const makeDir = path.resolve(process.cwd(), 'out', 'make');
fs.rmSync(makeDir, { recursive: true, force: true });
},
async postPackage(_forgeConfig, options) {