ESM Support
Open
:sparkles: enhancement
ESM
- Dominant language
- TypeScript
- Stars
- 7.8k
- Forks
- 762
- Avg merge
- 15h 27m
- Merged PRs (30d)
- 12
Description
With ESM support coming to Electron 28, it would be nice to have support for `main.mjs` in Fiddle when that release happens. Rough sketch of what I think is necessary to support it.
- Add support for `.mjs` as a file extension
- Support either `main.js` or `main.mjs` for main process code
- Smooth out the UX
- Don't allow both `main.js` and `main.mjs` to exist in a Fiddle
- Consider whichever is present to be the required file
- Show a warning to the user if they're trying to use `main.mjs` in a version before 28
Bonus points UX: Add a "Convert to ESM" button to the context menu when you right click `main.js`
Contributor guide
Assessment
This issue has not been assessed yet.