diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d06514..e5176ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -200,6 +200,9 @@ jobs: pnpm add @mihomo-party/sysproxy-win32-${{ matrix.arch }}-msvc pnpm add -D electron@22.3.27 (Get-Content electron-builder.yml) -replace 'windows', 'win7' | Set-Content electron-builder.yml + # Electron 22 requires CJS format + (Get-Content package.json) -replace '"type": "module"', '"type": "commonjs"' | Set-Content package.json + (Get-Content electron.vite.config.ts) -replace 'plugins: \[externalizeDepsPlugin\(\)\]', "plugins: [externalizeDepsPlugin()],`n build: { rollupOptions: { output: { format: 'cjs' } } }" | Set-Content electron.vite.config.ts - name: Update Version for Dev Build if: github.event_name == 'workflow_dispatch' env: