Skip to content

feat: support TS with script setup #402

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

Merged
merged 1 commit into from
Oct 25, 2021
Merged

feat: support TS with script setup #402

merged 1 commit into from
Oct 25, 2021

Conversation

beneee
Copy link
Contributor

@beneee beneee commented Oct 18, 2021

Automatic TypeScript detection and passing of the isTS option was introduced with the pull request #394.
Unfortunately that change was not enough to make this also work for components that utilize <script setup>.

The Vue plugin for Vite checks both the descriptor.scriptSetup.lang and the descriptor.script.lang field the check whether the given component is written in TypeScript: https://github.com/vitejs/vite/blob/b17b5ae68de50413a95fb992ceda92ec0fceaa86/packages/plugin-vue/src/template.ts#L164

This commit enables the same behavior for script setup components by additionally checking the descriptor.scriptSetup.lang property.

@lmiller1990 lmiller1990 merged commit 800b6f4 into vuejs:master Oct 25, 2021
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.

2 participants