Skip to content

feat(create-vite): extend from @vue/tsconfig to simplify tsconfig.app.json#18862

Merged
sapphi-red merged 2 commits intovitejs:mainfrom
haoqunjiang:chore-vue-template
Dec 19, 2024
Merged

feat(create-vite): extend from @vue/tsconfig to simplify tsconfig.app.json#18862
sapphi-red merged 2 commits intovitejs:mainfrom
haoqunjiang:chore-vue-template

Conversation

@haoqunjiang
Copy link
Copy Markdown
Member

Description

  • It aligns with the templates created from create-vue.
  • It makes the tsconfig.app.json more concise.
  • @vue/tsconfig has detailed documentation for each of the configuration fields and why they are needed for Vue.js development: https://github.com/vuejs/tsconfig/blob/main/tsconfig.json
  • I think it's easier to manage the TSConfig for Vue.js in a centralized way.
    For example, Vue.js 3.3 added jsxImportSource support, but not many people know this; the default Vite template doesn't have it configured either. But if the user extends from @vue/tsconfig, they will automatically benefit from this new feature when upgrading dependencies.

@ArnaudBarre
Copy link
Copy Markdown
Member

lib options seems undefined in the extended config and should be kept I think

@haoqunjiang
Copy link
Copy Markdown
Member Author

It's not empty, as this PR extends from tsconfig.dom.json instead of the base tsconfig.json.

@sapphi-red sapphi-red added the feat: create-vite create-vite package label Dec 3, 2024
Copy link
Copy Markdown
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

I think we can do this. Svelte template uses @tsconfig/svelte.

@sapphi-red sapphi-red merged commit 89eea02 into vitejs:main Dec 19, 2024
moonlitusun pushed a commit to moonlitusun/vite that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: create-vite create-vite package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants