Closed mulder3062 closed 1 month ago
Hi,
Going further we will gradually faze out the CJS builds, as will Electron also. Unfortunately you cannot fully configure the CLI to build out in CJS format for Electron. Switching from esm to cjs and from cjs to esm is not something we can achieve seamlessly (the devs would even have to change parts of the electron-main file). It would be a complete mess, and what we want to achieve with the new CLI is future-proofing it without the hassle.
Sorry if this is the not the right answer that you are looking for.
What happened?
I am developing an Electron app in a Quasar CLI environment and have encountered a problem, so I am summarizing it here. Because of a required dependency library, I changed the environment from ESM to CommonJS as shown below. A
.quasar/dev-electron/electron-main.cjs
file is created, but the Electron CLI always looks for the.quasar/dev-electron/electron-main.mjs
file. What I expect is for the.quasar/dev-electron/electron-main.cjs
file to be found and executed.I am looking for a solution.
What did you expect to happen?
Reproduction URL
https://codesandbox.io/p/devbox/quasar-electron-l7ldfq
How to reproduce?
tsconfig.json:
quasar.config.cjs:
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Electron Mode
Platforms/Browsers
Electron
Quasar info output
Relevant log output
Additional context
Since CodeSandbox is not a Windows OS, you only need to check the output log.
In particular the following message `App • Running "/workspace/node_modules/electron/cli.js --inspect=5858 /workspace/.quasar/dev-electron/electron-main.mjs" in /workspace