alex.wei

Results 98 comments of alex.wei

```ts // preload/index.d.ts import { ElectronAPI } from '@electron-toolkit/preload' declare global { interface Window { electron: ElectronAPI api: typeof preloadApi } } ```

@radislav Thank you for your contribution. This problem usually occurs because the third-party module used uses unconventional class writing methods. But if the module supports `cjs`, automatically excluding the build...

@chief-fei 未能复现此问题,是否有其他条件

通过脚手架创建一个新项目执行上述cli选项,无法复现此问题。你可以通过此方法确认是否与代码有关。

https://electron-vite.org/guide/troubleshooting.html#a-javascript-error-occurred-in-the-main-process-error-invaild-or-incompatible-cached-data-cacheddatarejected

> I wonder why it works no problem in 26 but not in 27 with the same config? > > We haven't changed our build processes at all between 26...

I think you package your app with electron-builder's universal mode, `universal` is not supported. https://electron-vite.org/guide/source-code-protection.html#multi-platform-build

> We've always been building Mac universal for the entire 25 and 26 electron without issues > > Our CI build process hasn't changed at all This depends on the...

Usually there will be problems with universal. You can try to package them into x64 and arm64 to see if the problem still exists.