From c3f5c9c5d7dce9687900824e6b02fed11b93973d Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Wed, 26 Apr 2023 14:42:53 +0800 Subject: [PATCH] fix: lang="tsx" can't be inlined Fixes #159 --- packages/plugin-vue/src/script.ts | 2 +- playground/vue-jsx/TsImport.vue | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue/src/script.ts b/packages/plugin-vue/src/script.ts index 226fcb9c..f62a31e1 100644 --- a/packages/plugin-vue/src/script.ts +++ b/packages/plugin-vue/src/script.ts @@ -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 diff --git a/playground/vue-jsx/TsImport.vue b/playground/vue-jsx/TsImport.vue index c63923d5..50ec0609 100644 --- a/playground/vue-jsx/TsImport.vue +++ b/playground/vue-jsx/TsImport.vue @@ -1,8 +1,16 @@