Skip to content

Commit

Permalink
fix: lang="tsx" can't be inlined
Browse files Browse the repository at this point in the history
Fixes #159
  • Loading branch information
haoqunjiang committed Apr 26, 2023
1 parent 9d0d7a7 commit c3f5c9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-vue/src/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function canInlineMain(
if (!lang) {
return true
}
if ((lang === 'ts' || lang === 'tsx') && options.devServer) {
if (lang === 'ts' && options.devServer) {
return true
}
return false
Expand Down
8 changes: 8 additions & 0 deletions playground/vue-jsx/TsImport.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<template>
<h2>Ts Import</h2>
<p class="ts-import">{{ foo }}</p>

<Bar />
</template>

<script setup lang="tsx">
import { foo } from './TsImportFile.js'
const Bar = () => (
<div class="bar">
<p>Bar</p>
</div>
)
</script>

0 comments on commit c3f5c9c

Please sign in to comment.