-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When is ESM support planned? #3684
Comments
There's already a support for ESM, although you might need to use |
As a dev that actually made a maker for forge with the use of ESM syntax and a requirement of using ESM to load it, I've also made an example how to apply this to Forge at its current stage. Having better implementation on Forge side would still be better suited for more transparent loading of stuff, so users of Forge toolkit don't have to care about whenever Forge loads something as ESM or CJS, so supporting both feels like a way to go unless there will be some movement to decide on dropping CJS entirely at some point in JS… |
According to the merge request, this has been incorporated into Electron main two weeks ago but I’m guessing it’s release pending? This would be a really helpful addition as it would also solve/prevent deepkit/deepkit-framework#615, an issue with the Deepkit type compiler getting understandably thrown off by using a different For Electron apps, this seems particularly strange because — assuming we’re all writing ESM syntax — the chain is ESM → CJS → ESM for everything running on an Electron renderer thread. |
这个例子中,没在 |
Pre-flight checklist
Problem description
When I wanted to migrate to ESM according to the latest version of electron-store, I found that forge.config.ts did not support ESM.
Proposed solution
Support ESM in forge.config
Alternatives considered
Additional information
ESM support is crucial for our project as we aim to use modern JavaScript features and improve code maintainability. The ability to use 'import' statements directly would significantly simplify our development process and allow us to better align with current JavaScript best practices. We've already migrated most of our codebase to use ESM syntax, and electron-forge's lack of support is the main blocker for our complete transition
The text was updated successfully, but these errors were encountered: