Results 4 comments of Alexander Korolev

I just went through this. Change `forge.config.ts` to `forge.config.cts`. In `vite.main.config.ts`, change `formats` from `['cjs']` to `['es']`. You will also need to polyfill or get rid of `__dirname` and `require()`...

Running into the same error. I am able to build and run another rust executable successfully. ``` Error: \\?\C:\Users\korolev\cpu-count\index.node is not a valid Win32 application. \\?\C:\Users\korolev\cpu-count\index.node at Module._extensions..node (node:internal/modules/cjs/loader:1340:18) at...

> @jdms754 what do you think about this issue? I added `import.meta.resolve('electron-squirrel-startup/package.json')` anywhere in https://github.com/jdms754/forge-vite-bundler/blob/main/src/main.ts and was able to `npm run start`. I am on macOS Sonoma 14.5, but I...

> I've already tried with `import.meta.resolve('electron-squirrel-startup/package.json')` (issue description). Maybe it's related to some settings in `tsconfig.json`: > > * https://github.com/rtritto/template-electron-vite/blob/master/tsconfig.json > * https://github.com/caoxiemeihao/electron-vite-samples/blob/main/forge-esm-ts/tsconfig.json > * https://github.com/jdms754/forge-vite-bundler/blob/main/tsconfig.json Yes, looks like it's...