Skip to content

Commit

Permalink
docs: fix source code snippets (#3102)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmaribojoc authored Apr 16, 2024
1 parent 05875ea commit ce4e554
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/docs/components/server/plugins/code-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export default defineNitroPlugin((nitro: any) => {

let filePath = resolver.resolve(normalizedSrc);
if (import.meta.env.NODE_ENV === 'prerender') {
filePath = path.join(path.dirname(import.meta.url), '..', '..', '..', filePath).replace('file:/', '/');
filePath = path.join(path.dirname(import.meta.url), '..', '..', '..', '..', filePath).replace('file:/', '/');
if (!fs.existsSync(filePath)) {
filePath = path
.join(path.dirname(import.meta.url), '..', '..', '..', '..', resolver.resolve(normalizedSrc))
.join(path.dirname(import.meta.url), '..', '..', '..', '..', '..', resolver.resolve(normalizedSrc))
.replace('file:/', '/');
}
}
Expand Down

0 comments on commit ce4e554

Please sign in to comment.