Skip to content

Commit fdb3590

Browse files
yiyunwanyiyunwan
and
yiyunwan
authoredNov 11, 2024··
feat: support tsPluginOptions (#445)
Co-authored-by: yiyunwan <yiyunwan@51shebao.com>
1 parent e432bcb commit fdb3590

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎packages/plugin-vue-jsx/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function vueJsxPlugin(options: Options = {}): Plugin {
4444
exclude,
4545
babelPlugins = [],
4646
defineComponentName = ['defineComponent'],
47+
tsPluginOptions = {},
4748
...babelPluginOptions
4849
} = options
4950
const filter = createFilter(include || /\.[jt]sx$/, exclude)
@@ -100,7 +101,7 @@ function vueJsxPlugin(options: Options = {}): Plugin {
100101
(r) => r.default,
101102
),
102103
// @ts-ignore
103-
{ isTSX: true, allowExtensions: true },
104+
{ ...tsPluginOptions, isTSX: true, allowExtensions: true },
104105
])
105106
}
106107

‎packages/plugin-vue-jsx/src/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ export interface Options extends VueJSXPluginOptions, FilterOptions {
1010
babelPlugins?: any[]
1111
/** @default ['defineComponent'] */
1212
defineComponentName?: string[]
13+
tsPluginOptions?: any
1314
}

0 commit comments

Comments
 (0)
Please sign in to comment.