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

Drop CommonJS support in Node packages, use "type": "module" #3017

Open
nolanlawson opened this issue Aug 23, 2022 · 2 comments
Open

Drop CommonJS support in Node packages, use "type": "module" #3017

nolanlawson opened this issue Aug 23, 2022 · 2 comments

Comments

@nolanlawson
Copy link
Collaborator

There is at least one dependency in our Node packages (e.g. estree-walker, which is a dependency of @lwc/template-compiler), which we cannot currently update because it dropped support for CommonJS.

Unfortunately ESM is kind of viral – if you want to import ESM synchronously, you basically need to use "type": "module" yourself. So updating our packages to "type": "module" would be a breaking change for our consumers.

@git2gus
Copy link

git2gus bot commented Nov 23, 2022

This issue has been linked to a new work item: W-12114588

@nolanlawson
Copy link
Collaborator Author

In practice this would probably mean converting our entire repo to "type": "module". Not a bad idea, but definitely a breaking change.

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

No branches or pull requests

1 participant