Skip to content

Commit

Permalink
fix: crash on processing virtual module imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rChaoz committed Apr 14, 2024
1 parent 09af3bf commit 5e3c4d6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts
Expand Up @@ -100,9 +100,7 @@ export async function svelteDocgen(svelteOptions: Record<string, any> = {}): Pro

let docOptions;
if (docPreprocessOptions) {
const rawSource = fs.readFileSync(resource).toString();

const { code: fileContent } = await preprocess(rawSource, docPreprocessOptions, {
const { code: fileContent } = await preprocess(src, docPreprocessOptions, {
filename: resource,
});

Expand Down

0 comments on commit 5e3c4d6

Please sign in to comment.