rtritto

Results 310 comments of rtritto

Some open points: 1. maybe this issue will be fixed with #3582 because `forge.config.ts` should work instead of `forge.config.cts` 2. should the _PnP loader_ be added to `ts-node` (example: `yarn...

FYI @Mike-Dax @alecmev @SpacingBat3

@merceyz what is the correct resolution for _yarn berry / PnP_? https://github.com/electron/forge/blob/38f64e4c9e2c79a3b9ff8447b1a23199415ede97/packages/utils/core-utils/src/electron-version.ts#L37-L43 I opened discussions: [#6323](https://github.com/yarnpkg/berry/discussions/6323) [#8185](https://github.com/orgs/pnpm/discussions/8185)

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

@caoxiemeihao should `external` constants in [/packages/plugin/vite/src/config/vite.base.config.ts](https://github.com/electron/forge/blob/main/packages/plugin/vite/src/config/vite.base.config.ts) also include *all* _dependencies_ in `package.json`? Related code: https://github.com/electron/forge/blob/420458bd2e6f34e4298c3a8d028c26e6e43ff90e/packages/plugin/vite/src/config/vite.base.config.ts#L8 E.g. (draft): ```diff + import pkg from './package.json' - export const external = [...builtins]; +...

Maybe only _dev dependencies_ should be exist (no _dependencies_) because there is the build step.

No, same issue with `[email protected]`. Using `import.meta.resolve('electron-squirrel-startup/package.json')`: ``` Ignore error: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'electron-squirrel-startup' imported from C:\template-electron-vite\.vite\build\main.js at packageResolve (node:internal/modules/esm/resolve:861:9) at moduleResolve (node:internal/modules/esm/resolve:934:18) at defaultResolve (node:internal/modules/esm/resolve:1176:11) at ModuleLoader.defaultResolve...

@wobsoriano any idea? FYI @magne4000 @phonzammi @Blankeos @atk