Skip to content

Conversation

marklundin
Copy link
Member

@marklundin marklundin commented Jun 16, 2025

Updates editor to generate ESM (.mjs) scripts as the default when no file suffix is given

Updates the api to to create ESM Scripts by default when a suffix is not supplied
@marklundin marklundin self-assigned this Jun 16, 2025
@marklundin marklundin added the enhancement New feature or request label Jun 16, 2025
@Maksims
Copy link
Collaborator

Maksims commented Jun 16, 2025

Lets not do this like that please, as this is alienating existing proejcts.

  1. It should be a project setting, that sets the default.
  2. For all current projects that people use, it should be ".js", so they don't get surprised why it started creating a new templates, especially with behavior changes associated with it.
  3. New created projects can have "ESM Scripts" on by default.
  4. Developer should have a choice to switch to a new system, if they want, but not forced with the current projects.

@marklundin
Copy link
Member Author

I'm for that. I think there was consensus on just switching it over. @slimbuck @willeastcott Any thoughts here?

@Maksims
Copy link
Collaborator

Maksims commented Jun 16, 2025

Please don't do that again: this will break peoples code, and forces developers with existing projects to make extra movement: type ".js" in places. Which is completely unnecessary reduction of UX.

Also, ESM still not fully polished and tested, so it is best to have only new projects set to ESM by default, so developers can test, catch all the issues with it, until it is considered as a "default" way of coding.

This is especially important, as mixing the script types in one project - is definitely not smooth process atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants