fumadocs-mdx 11.7.0 → 11.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-2KBRPMAM.js → chunk-4CGSOZUZ.js} +3 -29
- package/dist/chunk-JFNBRKRV.js +47 -0
- package/dist/{chunk-JPPCALFT.js → chunk-OWZSTKKX.js} +25 -1
- package/dist/chunk-VUEZTR2H.js +26 -0
- package/dist/config/index.cjs +0 -2
- package/dist/config/index.d.cts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +0 -2
- package/dist/{define-CCrinVBZ.d.ts → define-E6TRBwBQ.d.cts} +1 -1
- package/dist/{define-CCrinVBZ.d.cts → define-E6TRBwBQ.d.ts} +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/loader-mdx.cjs +19 -25
- package/dist/loader-mdx.js +5 -3
- package/dist/next/index.cjs +86 -68
- package/dist/next/index.js +49 -39
- package/dist/runtime/async.cjs +18 -22
- package/dist/runtime/async.d.cts +3 -3
- package/dist/runtime/async.d.ts +3 -3
- package/dist/runtime/async.js +3 -3
- package/dist/runtime/vite.cjs +42 -7
- package/dist/runtime/vite.d.cts +37 -11
- package/dist/runtime/vite.d.ts +37 -11
- package/dist/runtime/vite.js +42 -8
- package/dist/{types-C0bKwtAx.d.ts → types-DiL328cG.d.ts} +2 -2
- package/dist/{types-CnslxmoO.d.cts → types-Lh_-Uuix.d.cts} +2 -2
- package/dist/vite/index.cjs +217 -184
- package/dist/vite/index.js +168 -164
- package/package.json +9 -8
- package/dist/chunk-GWR7KMRU.js +0 -51
package/dist/vite/index.js
CHANGED
|
@@ -3,16 +3,21 @@ import {
|
|
|
3
3
|
countLines
|
|
4
4
|
} from "../chunk-C5INPAZJ.js";
|
|
5
5
|
import {
|
|
6
|
+
getGlobPatterns,
|
|
7
|
+
ident,
|
|
6
8
|
toImportPath
|
|
7
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-OWZSTKKX.js";
|
|
8
10
|
import {
|
|
9
|
-
|
|
10
|
-
} from "../chunk-
|
|
11
|
+
getGitTimestamp
|
|
12
|
+
} from "../chunk-VUEZTR2H.js";
|
|
11
13
|
import {
|
|
12
14
|
ValidationError,
|
|
13
15
|
validate
|
|
14
16
|
} from "../chunk-ZOWJF3OH.js";
|
|
15
17
|
import "../chunk-AVMO2SRO.js";
|
|
18
|
+
import {
|
|
19
|
+
buildConfig
|
|
20
|
+
} from "../chunk-JFNBRKRV.js";
|
|
16
21
|
import {
|
|
17
22
|
fumaMatter
|
|
18
23
|
} from "../chunk-KVWX6THC.js";
|
|
@@ -20,16 +25,144 @@ import {
|
|
|
20
25
|
// src/vite/index.ts
|
|
21
26
|
import { parse } from "querystring";
|
|
22
27
|
import { z } from "zod";
|
|
23
|
-
import fs from "fs/promises";
|
|
24
|
-
import path from "path";
|
|
28
|
+
import * as fs from "fs/promises";
|
|
29
|
+
import * as path from "path";
|
|
25
30
|
import { load } from "js-yaml";
|
|
26
|
-
|
|
31
|
+
|
|
32
|
+
// src/vite/generate-glob.ts
|
|
33
|
+
function generateGlob(name, collection) {
|
|
34
|
+
const patterns = mapGlobPatterns(getGlobPatterns(collection));
|
|
35
|
+
const options = {
|
|
36
|
+
query: {
|
|
37
|
+
collection: name
|
|
38
|
+
},
|
|
39
|
+
base: getGlobBase(collection)
|
|
40
|
+
};
|
|
41
|
+
if (collection.type === "meta") {
|
|
42
|
+
options.import = "default";
|
|
43
|
+
}
|
|
44
|
+
return `import.meta.glob(${JSON.stringify(patterns)}, ${JSON.stringify(options, null, 2)})`;
|
|
45
|
+
}
|
|
46
|
+
function mapGlobPatterns(patterns) {
|
|
47
|
+
return patterns.map((file) => {
|
|
48
|
+
if (file.startsWith("./")) return file;
|
|
49
|
+
if (file.startsWith("/")) return `.${file}`;
|
|
50
|
+
return `./${file}`;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function getGlobBase(collection) {
|
|
54
|
+
let dir = collection.dir;
|
|
55
|
+
if (Array.isArray(dir)) {
|
|
56
|
+
if (dir.length !== 1)
|
|
57
|
+
throw new Error(
|
|
58
|
+
`[Fumadocs MDX] Vite Plugin doesn't support multiple \`dir\` for a collection at the moment.`
|
|
59
|
+
);
|
|
60
|
+
dir = dir[0];
|
|
61
|
+
}
|
|
62
|
+
if (!dir.startsWith("./") && !dir.startsWith("/")) {
|
|
63
|
+
return "/" + dir;
|
|
64
|
+
}
|
|
65
|
+
return dir;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// src/vite/index.ts
|
|
27
69
|
var onlySchema = z.literal(["frontmatter", "all"]);
|
|
28
70
|
function mdx(config, options = {}) {
|
|
29
71
|
const { generateIndexFile = true, configPath = "source.config.ts" } = options;
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
72
|
+
const loaded = buildConfig(config);
|
|
73
|
+
async function transformMeta(path2, query, value) {
|
|
74
|
+
const isJson = path2.endsWith(".json");
|
|
75
|
+
const parsed = parse(query);
|
|
76
|
+
const collection = parsed.collection ? loaded.collections.get(parsed.collection) : void 0;
|
|
77
|
+
if (!collection) return null;
|
|
78
|
+
let schema;
|
|
79
|
+
switch (collection.type) {
|
|
80
|
+
case "meta":
|
|
81
|
+
schema = collection.schema;
|
|
82
|
+
break;
|
|
83
|
+
case "docs":
|
|
84
|
+
schema = collection.meta.schema;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
if (!schema) return null;
|
|
88
|
+
let data;
|
|
89
|
+
try {
|
|
90
|
+
data = isJson ? JSON.parse(value) : load(value);
|
|
91
|
+
} catch {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
const out = await validate(
|
|
95
|
+
schema,
|
|
96
|
+
data,
|
|
97
|
+
{ path: path2, source: value },
|
|
98
|
+
`invalid data in ${path2}`
|
|
99
|
+
);
|
|
100
|
+
return {
|
|
101
|
+
code: isJson ? JSON.stringify(out) : `export default ${JSON.stringify(out)}`,
|
|
102
|
+
map: null
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
async function transformContent(file, query, value) {
|
|
106
|
+
const matter = fumaMatter(value);
|
|
107
|
+
const isDevelopment = this.environment.mode === "dev";
|
|
108
|
+
const parsed = parse(query);
|
|
109
|
+
const collection = parsed.collection ? loaded.collections.get(parsed.collection) : void 0;
|
|
110
|
+
const only = parsed.only ? onlySchema.parse(parsed.only) : "all";
|
|
111
|
+
let schema;
|
|
112
|
+
let mdxOptions;
|
|
113
|
+
switch (collection?.type) {
|
|
114
|
+
case "doc":
|
|
115
|
+
mdxOptions = collection.mdxOptions;
|
|
116
|
+
schema = collection.schema;
|
|
117
|
+
break;
|
|
118
|
+
case "docs":
|
|
119
|
+
mdxOptions = collection.docs.mdxOptions;
|
|
120
|
+
schema = collection.docs.schema;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
if (schema) {
|
|
124
|
+
matter.data = await validate(
|
|
125
|
+
schema,
|
|
126
|
+
matter.data,
|
|
127
|
+
{
|
|
128
|
+
source: value,
|
|
129
|
+
path: file
|
|
130
|
+
},
|
|
131
|
+
`invalid frontmatter in ${file}`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
if (only === "frontmatter") {
|
|
135
|
+
return {
|
|
136
|
+
code: `export const frontmatter = ${JSON.stringify(matter.data)}`,
|
|
137
|
+
map: null
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
const data = {};
|
|
141
|
+
if (loaded.global.lastModifiedTime === "git") {
|
|
142
|
+
data.lastModified = (await getGitTimestamp(file))?.getTime();
|
|
143
|
+
}
|
|
144
|
+
mdxOptions ??= await loaded.getDefaultMDXOptions();
|
|
145
|
+
const lineOffset = isDevelopment ? countLines(matter.matter) : 0;
|
|
146
|
+
const compiled = await buildMDX(
|
|
147
|
+
parsed.collection ?? "global",
|
|
148
|
+
"\n".repeat(lineOffset) + matter.content,
|
|
149
|
+
{
|
|
150
|
+
development: isDevelopment,
|
|
151
|
+
...mdxOptions,
|
|
152
|
+
data,
|
|
153
|
+
filePath: file,
|
|
154
|
+
frontmatter: matter.data,
|
|
155
|
+
_compiler: {
|
|
156
|
+
addDependency: (file2) => {
|
|
157
|
+
this.addWatchFile(file2);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
return {
|
|
163
|
+
code: String(compiled.value),
|
|
164
|
+
map: compiled.map
|
|
165
|
+
};
|
|
33
166
|
}
|
|
34
167
|
return {
|
|
35
168
|
name: "fumadocs-mdx",
|
|
@@ -41,6 +174,7 @@ function mdx(config, options = {}) {
|
|
|
41
174
|
const outdir = process.cwd();
|
|
42
175
|
const outFile = "source.generated.ts";
|
|
43
176
|
const lines = [
|
|
177
|
+
'/// <reference types="vite/client" />',
|
|
44
178
|
`import { fromConfig } from 'fumadocs-mdx/runtime/vite';`,
|
|
45
179
|
`import type * as Config from '${toImportPath(configPath, {
|
|
46
180
|
relativeTo: outdir
|
|
@@ -48,177 +182,47 @@ function mdx(config, options = {}) {
|
|
|
48
182
|
"",
|
|
49
183
|
`export const create = fromConfig<typeof Config>();`
|
|
50
184
|
];
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function docs(name, dir, collection) {
|
|
59
|
-
const docFiles = collection.docs.files ? filesToGlob(collection.docs.files) : ["./**/*.{mdx,md}"];
|
|
60
|
-
const metaFiles = collection.meta.files ? filesToGlob(collection.meta.files) : ["./**/*.{yaml,json}"];
|
|
61
|
-
return `export const ${name} = create.docs('${name}', {
|
|
62
|
-
doc: import.meta.glob(${JSON.stringify(docFiles)}, {
|
|
63
|
-
query: {
|
|
64
|
-
collection: '${name}',
|
|
65
|
-
},
|
|
66
|
-
base: '${dir}',
|
|
67
|
-
}),
|
|
68
|
-
meta: import.meta.glob(${JSON.stringify(metaFiles)}, {
|
|
69
|
-
query: {
|
|
70
|
-
collection: '${name}',
|
|
71
|
-
},
|
|
72
|
-
base: '${dir}',
|
|
73
|
-
import: 'default',
|
|
74
|
-
}),
|
|
185
|
+
function docs(name, collection) {
|
|
186
|
+
const args = [
|
|
187
|
+
ident(`doc: ${generateGlob(name, collection.docs)}`),
|
|
188
|
+
ident(`meta: ${generateGlob(name, collection.meta)}`)
|
|
189
|
+
].join(",\n");
|
|
190
|
+
return `export const ${name} = create.docs("${name}", {
|
|
191
|
+
${args}
|
|
75
192
|
});`;
|
|
76
193
|
}
|
|
77
|
-
function doc(name,
|
|
78
|
-
const
|
|
79
|
-
return `export const ${name} = create.doc(
|
|
80
|
-
'${name}',
|
|
81
|
-
import.meta.glob(${JSON.stringify(files)}, {
|
|
82
|
-
query: {
|
|
83
|
-
collection: '${name}',
|
|
84
|
-
},
|
|
85
|
-
base: '${dir}',
|
|
86
|
-
}),
|
|
87
|
-
);`;
|
|
194
|
+
function doc(name, collection) {
|
|
195
|
+
return `export const ${name} = create.doc("${name}", ${generateGlob(name, collection)});`;
|
|
88
196
|
}
|
|
89
|
-
function meta(name,
|
|
90
|
-
const
|
|
91
|
-
return `export const ${name} = create.meta(
|
|
92
|
-
'${name}',
|
|
93
|
-
import.meta.glob(${JSON.stringify(files)}, {
|
|
94
|
-
query: {
|
|
95
|
-
collection: '${name}',
|
|
96
|
-
},
|
|
97
|
-
base: '${dir}',
|
|
98
|
-
import: 'default',
|
|
99
|
-
}),
|
|
100
|
-
);`;
|
|
197
|
+
function meta(name, collection) {
|
|
198
|
+
return `export const ${name} = create.meta("${name}", ${generateGlob(name, collection)});`;
|
|
101
199
|
}
|
|
102
200
|
for (const [name, collection] of loaded.collections.entries()) {
|
|
103
|
-
let dir = collection.dir;
|
|
104
|
-
if (Array.isArray(dir) && dir.length === 1) {
|
|
105
|
-
dir = dir[0];
|
|
106
|
-
} else if (Array.isArray(dir)) {
|
|
107
|
-
throw new Error(
|
|
108
|
-
`[Fumadocs MDX] Vite Plugin doesn't support multiple \`dir\` for a collection at the moment.`
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
if (!dir.startsWith("./") && !dir.startsWith("/")) {
|
|
112
|
-
dir = "/" + dir;
|
|
113
|
-
}
|
|
114
201
|
lines.push("");
|
|
115
202
|
if (collection.type === "docs") {
|
|
116
|
-
lines.push(docs(name,
|
|
203
|
+
lines.push(docs(name, collection));
|
|
117
204
|
} else if (collection.type === "meta") {
|
|
118
|
-
lines.push(meta(name,
|
|
205
|
+
lines.push(meta(name, collection));
|
|
119
206
|
} else {
|
|
120
|
-
lines.push(doc(name,
|
|
207
|
+
lines.push(doc(name, collection));
|
|
121
208
|
}
|
|
122
209
|
}
|
|
123
210
|
await fs.writeFile(path.join(outdir, outFile), lines.join("\n"));
|
|
124
211
|
},
|
|
125
212
|
async transform(value, id) {
|
|
126
|
-
const [
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
schema2 = collection2.schema;
|
|
137
|
-
break;
|
|
138
|
-
case "docs":
|
|
139
|
-
schema2 = collection2.meta.schema;
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
if (!schema2) return null;
|
|
143
|
-
let data;
|
|
144
|
-
try {
|
|
145
|
-
data = isJson ? JSON.parse(value) : load(value);
|
|
146
|
-
} catch {
|
|
147
|
-
return null;
|
|
213
|
+
const [file, query = ""] = id.split("?");
|
|
214
|
+
const ext = path.extname(file);
|
|
215
|
+
try {
|
|
216
|
+
if ([".yaml", ".json"].includes(ext))
|
|
217
|
+
return await transformMeta(file, query, value);
|
|
218
|
+
if ([".md", ".mdx"].includes(ext))
|
|
219
|
+
return await transformContent.call(this, file, query, value);
|
|
220
|
+
} catch (e) {
|
|
221
|
+
if (e instanceof ValidationError) {
|
|
222
|
+
throw new Error(e.toStringFormatted());
|
|
148
223
|
}
|
|
149
|
-
|
|
150
|
-
schema2,
|
|
151
|
-
data,
|
|
152
|
-
{ path: path2, source: value },
|
|
153
|
-
`invalid data in ${path2}`
|
|
154
|
-
);
|
|
155
|
-
return {
|
|
156
|
-
code: isJson ? JSON.stringify(out) : `export default ${JSON.stringify(out)}`,
|
|
157
|
-
map: null
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
if (!fileRegex.test(path2)) return;
|
|
161
|
-
const matter = fumaMatter(value);
|
|
162
|
-
const isDevelopment = this.environment.mode === "dev";
|
|
163
|
-
const parsed = parse(query);
|
|
164
|
-
const collection = parsed.collection ? loaded.collections.get(parsed.collection) : void 0;
|
|
165
|
-
const only = parsed.only ? onlySchema.parse(parsed.only) : "all";
|
|
166
|
-
let schema;
|
|
167
|
-
let mdxOptions;
|
|
168
|
-
switch (collection?.type) {
|
|
169
|
-
case "doc":
|
|
170
|
-
mdxOptions = collection.mdxOptions;
|
|
171
|
-
schema = collection.schema;
|
|
172
|
-
break;
|
|
173
|
-
case "docs":
|
|
174
|
-
mdxOptions = collection.docs.mdxOptions;
|
|
175
|
-
schema = collection.docs.schema;
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
if (schema) {
|
|
179
|
-
try {
|
|
180
|
-
matter.data = await validate(
|
|
181
|
-
schema,
|
|
182
|
-
matter.data,
|
|
183
|
-
{
|
|
184
|
-
source: value,
|
|
185
|
-
path: path2
|
|
186
|
-
},
|
|
187
|
-
`invalid frontmatter in ${path2}`
|
|
188
|
-
);
|
|
189
|
-
} catch (e) {
|
|
190
|
-
if (e instanceof ValidationError) {
|
|
191
|
-
throw new Error(e.toStringFormatted());
|
|
192
|
-
}
|
|
193
|
-
throw e;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
if (only === "frontmatter") {
|
|
197
|
-
return {
|
|
198
|
-
code: `export const frontmatter = ${JSON.stringify(matter.data)}`
|
|
199
|
-
};
|
|
224
|
+
throw e;
|
|
200
225
|
}
|
|
201
|
-
mdxOptions ??= await loaded.getDefaultMDXOptions();
|
|
202
|
-
const lineOffset = isDevelopment ? countLines(matter.matter) : 0;
|
|
203
|
-
const file = await buildMDX(
|
|
204
|
-
parsed.collection ?? "global",
|
|
205
|
-
"\n".repeat(lineOffset) + matter.content,
|
|
206
|
-
{
|
|
207
|
-
development: isDevelopment,
|
|
208
|
-
...mdxOptions,
|
|
209
|
-
filePath: path2,
|
|
210
|
-
frontmatter: matter.data,
|
|
211
|
-
_compiler: {
|
|
212
|
-
addDependency: (file2) => {
|
|
213
|
-
this.addWatchFile(file2);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
);
|
|
218
|
-
return {
|
|
219
|
-
code: String(file.value),
|
|
220
|
-
map: file.map
|
|
221
|
-
};
|
|
222
226
|
}
|
|
223
227
|
};
|
|
224
228
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.3",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -62,24 +62,25 @@
|
|
|
62
62
|
"tinyexec": "^1.0.1",
|
|
63
63
|
"tinyglobby": "^0.2.14",
|
|
64
64
|
"unist-util-visit": "^5.0.0",
|
|
65
|
-
"zod": "^4.0.
|
|
65
|
+
"zod": "^4.0.14"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/js-yaml": "^4.0.9",
|
|
69
69
|
"@types/mdast": "^4.0.3",
|
|
70
70
|
"@types/mdx": "^2.0.13",
|
|
71
|
-
"@types/node": "^24.0
|
|
72
|
-
"@types/react": "^19.1.
|
|
71
|
+
"@types/node": "^24.1.0",
|
|
72
|
+
"@types/react": "^19.1.9",
|
|
73
73
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
74
|
-
"next": "^15.4.
|
|
75
|
-
"react": "^19.1.
|
|
74
|
+
"next": "^15.4.5",
|
|
75
|
+
"react": "^19.1.1",
|
|
76
|
+
"rollup": "^4.46.2",
|
|
76
77
|
"unified": "^11.0.5",
|
|
77
78
|
"vfile": "^6.0.3",
|
|
78
79
|
"vite": "^7.0.5",
|
|
79
|
-
"webpack": "^5.
|
|
80
|
+
"webpack": "^5.101.0",
|
|
80
81
|
"@fumadocs/mdx-remote": "1.4.0",
|
|
81
82
|
"eslint-config-custom": "0.0.0",
|
|
82
|
-
"fumadocs-core": "15.6.
|
|
83
|
+
"fumadocs-core": "15.6.7",
|
|
83
84
|
"tsconfig": "0.0.0"
|
|
84
85
|
},
|
|
85
86
|
"peerDependencies": {
|
package/dist/chunk-GWR7KMRU.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// src/config/build.ts
|
|
2
|
-
function buildConfig(config) {
|
|
3
|
-
const collections = /* @__PURE__ */ new Map();
|
|
4
|
-
let globalConfig;
|
|
5
|
-
for (const [k, v] of Object.entries(config)) {
|
|
6
|
-
if (!v) {
|
|
7
|
-
continue;
|
|
8
|
-
}
|
|
9
|
-
if (typeof v === "object" && "type" in v) {
|
|
10
|
-
if (v.type === "docs") {
|
|
11
|
-
collections.set(k, v);
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
if (v.type === "doc" || v.type === "meta") {
|
|
15
|
-
collections.set(k, v);
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (k === "default") {
|
|
20
|
-
globalConfig = v;
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
return [
|
|
24
|
-
`Unknown export "${k}", you can only export collections from source configuration file.`,
|
|
25
|
-
null
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
let cachedMdxOptions;
|
|
29
|
-
return [
|
|
30
|
-
null,
|
|
31
|
-
{
|
|
32
|
-
global: globalConfig,
|
|
33
|
-
collections,
|
|
34
|
-
async getDefaultMDXOptions() {
|
|
35
|
-
if (cachedMdxOptions) return cachedMdxOptions;
|
|
36
|
-
const input = this.global?.mdxOptions;
|
|
37
|
-
async function uncached() {
|
|
38
|
-
const options = typeof input === "function" ? await input() : input;
|
|
39
|
-
const { getDefaultMDXOptions } = await import("./mdx-options-UDV5WEFU.js");
|
|
40
|
-
if (options?.preset === "minimal") return options;
|
|
41
|
-
return getDefaultMDXOptions(options ?? {});
|
|
42
|
-
}
|
|
43
|
-
return cachedMdxOptions = uncached();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export {
|
|
50
|
-
buildConfig
|
|
51
|
-
};
|