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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/create-vite/template-lit-ts/package.json
Expand Up @@ -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

"exports": {
".": "./dist/my-element.es.mjs"
Expand Down
1 change: 1 addition & 0 deletions packages/create-vite/template-lit/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "vite-lit-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"main": "dist/my-element.es.mjs",
"exports": {
".": "./dist/my-element.es.mjs"
Expand Down
1 change: 1 addition & 0 deletions packages/create-vite/template-preact-ts/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "vite-preact-ts-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand Down
1 change: 1 addition & 0 deletions packages/create-vite/template-preact/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "vite-preact-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
1 change: 1 addition & 0 deletions packages/create-vite/template-react-ts/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "vite-react-typescript-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand Down
1 change: 1 addition & 0 deletions packages/create-vite/template-react/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "vite-react-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
1 change: 1 addition & 0 deletions packages/create-vite/template-vanilla-ts/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "vite-typescript-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand Down
1 change: 1 addition & 0 deletions packages/create-vite/template-vanilla/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "vite-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
1 change: 1 addition & 0 deletions packages/create-vite/template-vue-ts/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "vite-vue-typescript-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
Expand Down
1 change: 1 addition & 0 deletions packages/create-vite/template-vue/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "vite-vue-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down