fumadocs-mdx 11.2.2 → 11.2.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.
|
@@ -9,20 +9,34 @@ import * as fs from "node:fs";
|
|
|
9
9
|
// src/config/load.ts
|
|
10
10
|
import * as path from "node:path";
|
|
11
11
|
import { pathToFileURL } from "node:url";
|
|
12
|
-
import { createJiti } from "jiti";
|
|
13
12
|
function findConfigFile() {
|
|
14
13
|
return path.resolve("source.config.ts");
|
|
15
14
|
}
|
|
16
|
-
var jiti = createJiti(import.meta.url, {
|
|
17
|
-
moduleCache: false
|
|
18
|
-
});
|
|
19
15
|
async function loadConfig(configPath) {
|
|
20
|
-
const
|
|
21
|
-
|
|
16
|
+
const outputPath = path.resolve(".source/source.config.mjs");
|
|
17
|
+
const { build } = await import("esbuild");
|
|
18
|
+
const transformed = await build({
|
|
19
|
+
entryPoints: [{ in: configPath, out: "source.config" }],
|
|
20
|
+
bundle: true,
|
|
21
|
+
outdir: ".source",
|
|
22
|
+
target: "node18",
|
|
23
|
+
write: true,
|
|
24
|
+
platform: "node",
|
|
25
|
+
format: "esm",
|
|
26
|
+
packages: "external",
|
|
27
|
+
outExtension: {
|
|
28
|
+
".js": ".mjs"
|
|
29
|
+
},
|
|
30
|
+
allowOverwrite: true,
|
|
31
|
+
splitting: true
|
|
22
32
|
});
|
|
33
|
+
if (transformed.errors.length > 0) {
|
|
34
|
+
throw new Error("failed to compile configuration file");
|
|
35
|
+
}
|
|
36
|
+
const url = pathToFileURL(outputPath);
|
|
23
37
|
const [err, config] = buildConfig(
|
|
24
38
|
// every call to `loadConfig` will cause the previous cache to be ignored
|
|
25
|
-
|
|
39
|
+
await import(`${url.href}?hash=${Date.now().toString()}`)
|
|
26
40
|
);
|
|
27
41
|
if (err !== null) throw new Error(err);
|
|
28
42
|
return config;
|
package/dist/loader-mdx.js
CHANGED
package/dist/next/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.3",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@mdx-js/mdx": "^3.1.0",
|
|
39
39
|
"chokidar": "^4.0.3",
|
|
40
40
|
"cross-spawn": "^7.0.6",
|
|
41
|
+
"esbuild": "^0.24.2",
|
|
41
42
|
"estree-util-value-to-estree": "^3.2.1",
|
|
42
43
|
"fast-glob": "^3.3.1",
|
|
43
44
|
"gray-matter": "^4.0.3",
|
|
44
|
-
"jiti": "^2.4.2",
|
|
45
45
|
"micromatch": "^4.0.8",
|
|
46
46
|
"unist-util-visit": "^5.0.0",
|
|
47
47
|
"zod": "^3.24.1"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"vfile": "^6.0.3",
|
|
59
59
|
"webpack": "^5.97.1",
|
|
60
60
|
"eslint-config-custom": "0.0.0",
|
|
61
|
-
"fumadocs-core": "14.7.
|
|
61
|
+
"fumadocs-core": "14.7.1",
|
|
62
62
|
"tsconfig": "0.0.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|