From a69ee491f0134deccf0c0bb4221e2b2d49c1c1c3 Mon Sep 17 00:00:00 2001 From: underfin Date: Tue, 17 Dec 2024 20:19:57 +0800 Subject: [PATCH] fix: wraning react/jsx-runtime --- packages/plugin-vue-jsx/src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/plugin-vue-jsx/src/index.ts b/packages/plugin-vue-jsx/src/index.ts index 68cbe9ea..78a62c12 100644 --- a/packages/plugin-vue-jsx/src/index.ts +++ b/packages/plugin-vue-jsx/src/index.ts @@ -59,6 +59,13 @@ function vueJsxPlugin(options: Options = {}): Plugin { oxc: { include: /\.ts$/, }, + optimizeDeps: { + rollupOptions: { + jsx: { + mode: 'classic', // TODO using rolldown jsx preserve + }, + }, + }, define: { __VUE_OPTIONS_API__: config.define?.__VUE_OPTIONS_API__ ?? true, __VUE_PROD_DEVTOOLS__: config.define?.__VUE_PROD_DEVTOOLS__ ?? false, @@ -138,6 +145,7 @@ function vueJsxPlugin(options: Options = {}): Plugin { return { code: result.code, map: result.map, + moduleType: 'js', } } @@ -263,6 +271,7 @@ function vueJsxPlugin(options: Options = {}): Plugin { return { code: result.code, map: result.map, + moduleType: 'js', } } },