Skip to content

Commit

Permalink
feat: support tsPluginOptions (#445)
Browse files Browse the repository at this point in the history
Co-authored-by: yiyunwan <[email protected]>
  • Loading branch information
yiyunwan and yiyunwan authored Nov 11, 2024
1 parent e432bcb commit fdb3590
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/plugin-vue-jsx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function vueJsxPlugin(options: Options = {}): Plugin {
exclude,
babelPlugins = [],
defineComponentName = ['defineComponent'],
tsPluginOptions = {},
...babelPluginOptions
} = options
const filter = createFilter(include || /\.[jt]sx$/, exclude)
Expand Down Expand Up @@ -100,7 +101,7 @@ function vueJsxPlugin(options: Options = {}): Plugin {
(r) => r.default,
),
// @ts-ignore
{ isTSX: true, allowExtensions: true },
{ ...tsPluginOptions, isTSX: true, allowExtensions: true },
])
}

Expand Down
1 change: 1 addition & 0 deletions packages/plugin-vue-jsx/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export interface Options extends VueJSXPluginOptions, FilterOptions {
babelPlugins?: any[]
/** @default ['defineComponent'] */
defineComponentName?: string[]
tsPluginOptions?: any
}

0 comments on commit fdb3590

Please sign in to comment.