Skip to content
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

Use pure ES modules #3742

Closed
ehmicky opened this issue Oct 15, 2021 · 0 comments · Fixed by #3970
Closed

Use pure ES modules #3742

ehmicky opened this issue Oct 15, 2021 · 0 comments · Fixed by #3970
Assignees
Labels
type: chore work needed to keep the product and development running smoothly

Comments

@ehmicky
Copy link
Contributor

ehmicky commented Oct 15, 2021

See background at https://github.com/netlify/team-dev/issues/36

Once #3741 is done and released, we should use pure ES modules and make a major release.

This is more than just switching from CommonJS to import/export. See this list for other changes which might be involved. This should be broken in many PRs, as much as possible, to lower the risk. Also, non-breaking changes (such as adding file extensions in imports, or loading JSON files differently) should be done before the breaking changes (such as using import/export statements).

This applies to all packages of this monorepo, including @netlify/build and @netlify/config.

This should only be done after Netlify CLI has done it first (netlify/cli#3514).

This would not break sites because:

  • The buildbot is running @netlify/build as a binary.
  • The CLI would support pure ES modules.
  • CommonJS plugins would still be supported. They be detected as CommonJS by import().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant