templates/.umirc.ts
2024-04-09 11:23:19 +08:00

22 lines
501 B
TypeScript

import { defineConfig } from 'umi';
import { Platform, createTargets } from '@umijs/plugin-electron';
// example: mac & windows
const targets = createTargets([Platform.WINDOWS]);
// example: mac m1
// const targets = Platform.MAC.createTarget(['dmg'], Arch.arm64);
export default defineConfig({
npmClient: 'yarn',
plugins: ['@umijs/plugin-electron'],
electron: {
builder: {
targets
},
extraDevFiles: {
// 'xxxx.js' : fs.readFileSync('xxxx.js','utf-8'),
}
},
});