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

feat(create-vite): add type: module to all templates #8251

Merged
merged 1 commit into from May 23, 2022

Conversation

antfu
Copy link
Member

@antfu antfu commented May 21, 2022

This doesn't really change the functionality but is more like a move to help the community to start projects in ESM and help the overall migration.

@@ -2,6 +2,7 @@
"name": "vite-lit-ts-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"main": "dist/my-element.es.mjs",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also use dist/my-element.js now that we type module? I think it is better if the templates already provide a clean world for ES, and add extra noise for CJS.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So basically zero cjs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need to change this once we switch the templates to Vite 3, as this has been changed by #8107

@patak-dev patak-dev merged commit c3ec60c into main May 23, 2022
@patak-dev patak-dev deleted the docs/example-esm branch May 23, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants