-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wow, can't believe this day has finally come! You can essentially write most of your Electron code in pure ESM now! The only holdup is that preload scripts must be CommonJS still. But you can just add the `.cjs/.cts` extension for that one module, so that works out really well. This was what made me come back to work on this project a little bit again. Rather than starting fresh with a new Electron project, I thought it would be a better idea to update this one to use my more recent tooling (TS, ESM in this case), and I want to try some Electron-specific things out too, like Accelerators, things like that. Ooh, I want to get Vite/live reload working with this too, I didn't end up getting that set up when I started this, Node projects were still above my head at that time. electron/electron#21457 electron/electron#37535 https://github.com/electron/electron/blob/main/docs/tutorial/esm.md This was a placeholder I set up for the reference to resolve the preload script, since `__dirname` isn't an available global from within ESM. https://blog.logrocket.com/alternatives-dirname-node-js-es-modules/ Sevendust Next is definitely one of my favorite albums of theirs for me, looking back on it more recently the last year or so.
- Loading branch information
1 parent
7707c83
commit 50d98f6
Showing
6 changed files
with
36 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters