mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
fix(mdx): fix compatibility with ?raw query string
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-mdx': patch
|
||||
---
|
||||
|
||||
Fix compatibility with `?raw` query string
|
||||
@@ -108,9 +108,14 @@ export function toVite(loader: Loader): ViteLoader {
|
||||
const [file, query = ''] = id.split('?', 2);
|
||||
|
||||
try {
|
||||
const parsedQuery = parse(query);
|
||||
if ('raw' in parsedQuery) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const result = await loader.load({
|
||||
filePath: file,
|
||||
query: parse(query),
|
||||
query: parsedQuery,
|
||||
getSource() {
|
||||
return value;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user