Skip to content

Commit

Permalink
feat(plugin-vue): add api type to plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Nov 28, 2023
1 parent 9c93426 commit 028617d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/plugin-vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ export interface ResolvedOptions extends Options {
devToolsEnabled?: boolean
}

export default function vuePlugin(rawOptions: Options = {}): Plugin {
export interface Api {
get options(): ResolvedOptions
set options(value: ResolvedOptions)
version: string
}

export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
const options = shallowRef<ResolvedOptions>({
isProduction: process.env.NODE_ENV === 'production',
compiler: null as any, // to be set in buildStart
Expand Down

0 comments on commit 028617d

Please sign in to comment.