Skip to content

ESM Support #1466

Open
Open
@dsanders11

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions