Closed beneee closed 2 years ago
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>.
isTS
<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
descriptor.scriptSetup.lang
descriptor.script.lang
This commit enables the same behavior for script setup components by additionally checking the descriptor.scriptSetup.lang property.
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 thedescriptor.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#L164This commit enables the same behavior for script setup components by additionally checking the
descriptor.scriptSetup.lang
property.