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

Add "type": "module" to packages #6449

Closed
3 tasks
pskelin opened this issue Feb 9, 2023 · 0 comments · Fixed by #6617
Closed
3 tasks

Add "type": "module" to packages #6449

pskelin opened this issue Feb 9, 2023 · 0 comments · Fixed by #6617

Comments

@pskelin
Copy link
Contributor

pskelin commented Feb 9, 2023

webcomponents are shipped as ES6 modules, so we should add the "type": "module" field to package.json to make it more explicit and enable node.js to precess the imports as ESM.

more information:
https://nodejs.org/api/packages.html

There are a few things to be addressed that are written as common js and fail when setting the type to module:

  • all configuration files list package-scripts.js will need to become either .cjs and the tooling should find them or they should become ESM too (if the tooling supports this)
  • test specs are CJS right now, shoul become .cjs or be rewritten to ESM
  • further adaptations to the tools package necessary to make all current scripts run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

4 participants