Skip to content

Commit

Permalink
fix: Added options parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
OssamaSijbesma committed Sep 5, 2023
1 parent 0a81127 commit 3b7f12e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/frameworks/vue3-vite/src/plugins/vue-docgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { PluginOption } from 'vite';
import { createFilter } from 'vite';
import MagicString from 'magic-string';

export function vueDocgen(): PluginOption {
export function vueDocgen(options): PluginOption {
const include = /\.(vue)$/;
const filter = createFilter(include);

Expand All @@ -13,7 +13,7 @@ export function vueDocgen(): PluginOption {
async transform(src: string, id: string) {
if (!filter(id)) return undefined;

const metaData = await parse(id);
const metaData = await parse(id, options);
const metaSource = JSON.stringify(metaData);
const s = new MagicString(src);
s.append(`;_sfc_main.__docgenInfo = ${metaSource}`);
Expand Down

0 comments on commit 3b7f12e

Please sign in to comment.