fumadocs-mdx 15.0.6 → 15.0.7
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/bun/index.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/{core-C4xPhmBp.d.ts → core-BFnJKNy5.d.ts} +8 -1
- package/dist/dist-AsMH2g66.js +107 -0
- package/dist/index.d.ts +1 -1
- package/dist/next/index.d.ts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/plugins/index-file.d.ts +1 -1
- package/dist/plugins/json-schema.d.ts +1 -1
- package/dist/plugins/last-modified.d.ts +1 -1
- package/dist/runtime/browser.d.ts +1 -1
- package/dist/runtime/dynamic.d.ts +1 -1
- package/dist/runtime/server.d.ts +1 -1
- package/dist/runtime/server.js +3 -0
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +4 -4
- package/dist/dist-B7SYXrlp.js +0 -190
package/dist/bun/index.d.ts
CHANGED
package/dist/config/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as DocCollection, B as MDXPresetOptions, D as AnyCollection, E as remarkInclude, F as defineConfig, I as defineDocs, M as GlobalConfig, N as MetaCollection, O as BaseCollection, P as defineCollections, R as PostprocessOptions, T as metaSchema, V as applyMdxPreset, j as DocsCollection, k as CollectionSchema, w as frontmatterSchema, z as DefaultMDXOptions } from "../core-
|
|
1
|
+
import { A as DocCollection, B as MDXPresetOptions, D as AnyCollection, E as remarkInclude, F as defineConfig, I as defineDocs, M as GlobalConfig, N as MetaCollection, O as BaseCollection, P as defineCollections, R as PostprocessOptions, T as metaSchema, V as applyMdxPreset, j as DocsCollection, k as CollectionSchema, w as frontmatterSchema, z as DefaultMDXOptions } from "../core-BFnJKNy5.js";
|
|
2
2
|
export { AnyCollection, BaseCollection, CollectionSchema, DefaultMDXOptions, DocCollection, DocsCollection, GlobalConfig, MDXPresetOptions, MetaCollection, PostprocessOptions, applyMdxPreset, defineCollections, defineConfig, defineDocs, frontmatterSchema, metaSchema, remarkInclude };
|
|
@@ -12,6 +12,7 @@ import { Root } from "mdast";
|
|
|
12
12
|
import { FSWatcher } from "chokidar";
|
|
13
13
|
import { MetaData, PageData, Source } from "fumadocs-core/source";
|
|
14
14
|
import * as _$zod_v4_core0 from "zod/v4/core";
|
|
15
|
+
import { StructuredData as StructuredData$1 } from "fumadocs-core/mdx-plugins/remark-structure";
|
|
15
16
|
|
|
16
17
|
//#region src/config/preset.d.ts
|
|
17
18
|
type ResolvePlugins = Pluggable[] | ((v: Pluggable[]) => Pluggable[]);
|
|
@@ -90,6 +91,11 @@ interface MetaCollection<Schema extends StandardSchemaV1 = StandardSchemaV1> ext
|
|
|
90
91
|
interface DocCollection<Schema extends StandardSchemaV1 = StandardSchemaV1> extends BaseCollection {
|
|
91
92
|
type: 'doc';
|
|
92
93
|
postprocess?: Partial<PostprocessOptions>;
|
|
94
|
+
/**
|
|
95
|
+
* By defining a collection-level MDX options, **the default options & plugins will be removed**.
|
|
96
|
+
*
|
|
97
|
+
* See [`mdxOptions`](https://fumadocs.dev/docs/mdx/collections#mdxoptions) for details.
|
|
98
|
+
*/
|
|
93
99
|
mdxOptions?: ProcessorOptions | ((environment: BuildEnvironment) => Promise<ProcessorOptions>);
|
|
94
100
|
/**
|
|
95
101
|
* Load files with async
|
|
@@ -113,7 +119,7 @@ interface DocsCollection<DocSchema extends StandardSchemaV1 = StandardSchemaV1,
|
|
|
113
119
|
interface GlobalConfig {
|
|
114
120
|
plugins?: PluginOption[];
|
|
115
121
|
/**
|
|
116
|
-
* Configure global MDX options
|
|
122
|
+
* Configure global MDX options, will be used by all `doc` collections unless collection-level `mdxOptions` is specified.
|
|
117
123
|
*/
|
|
118
124
|
mdxOptions?: MDXPresetOptions | (() => Promise<MDXPresetOptions>);
|
|
119
125
|
workspaces?: Record<string, {
|
|
@@ -203,6 +209,7 @@ interface ToFumadocsSourceOptions {
|
|
|
203
209
|
}
|
|
204
210
|
type AsyncDocCollectionEntry<Name extends string = string, Frontmatter = unknown, TC extends InternalTypeConfig = InternalTypeConfig> = {
|
|
205
211
|
load: () => Promise<DocData & TC['DocData'][Name]>;
|
|
212
|
+
structuredData: () => Promise<StructuredData$1>;
|
|
206
213
|
} & DocMethods & Frontmatter;
|
|
207
214
|
interface DocsCollectionEntry<Name extends string = string, Frontmatter extends PageData = PageData, Meta extends MetaData = MetaData, TC extends InternalTypeConfig = InternalTypeConfig> {
|
|
208
215
|
docs: DocCollectionEntry<Name, Frontmatter, TC>[];
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
//#region ../vite/dist/index.js
|
|
4
|
+
async function findClosestPkgJsonPath(dir, predicate) {
|
|
5
|
+
let currentDir = dir.endsWith("package.json") ? path.dirname(dir) : dir;
|
|
6
|
+
while (currentDir) {
|
|
7
|
+
const pkg = path.join(currentDir, "package.json");
|
|
8
|
+
try {
|
|
9
|
+
if ((await fs.stat(pkg)).isFile() && (!predicate || await predicate(pkg))) return pkg;
|
|
10
|
+
} catch {}
|
|
11
|
+
const nextDir = path.dirname(currentDir);
|
|
12
|
+
if (nextDir === currentDir) break;
|
|
13
|
+
currentDir = nextDir;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
async function readJson(pkgJsonPath) {
|
|
17
|
+
return JSON.parse(await fs.readFile(pkgJsonPath, "utf8"));
|
|
18
|
+
}
|
|
19
|
+
var generated_default = {
|
|
20
|
+
optimizeDeps: {
|
|
21
|
+
"include": [
|
|
22
|
+
"@fumadocs/local-md > estree-util-to-js > source-map",
|
|
23
|
+
"@fumadocs/local-md > hast-util-to-jsx-runtime > mdast-util-mdx-expression > mdast-util-from-markdown > micromark > debug",
|
|
24
|
+
"@fumadocs/local-md > hast-util-to-jsx-runtime > style-to-js",
|
|
25
|
+
"@fumadocs/local-md > picomatch",
|
|
26
|
+
"@fumadocs/local-md > remark > unified > extend",
|
|
27
|
+
"@fumadocs/mdx-remote > @mdx-js/mdx > hast-util-to-jsx-runtime > style-to-js",
|
|
28
|
+
"@fumadocs/mdx-remote > @mdx-js/mdx > remark-parse > mdast-util-from-markdown > micromark > debug",
|
|
29
|
+
"@fumadocs/mdx-remote > @mdx-js/mdx > source-map",
|
|
30
|
+
"@fumadocs/mdx-remote > js-yaml > argparse",
|
|
31
|
+
"@fumadocs/mdx-remote > unified > extend",
|
|
32
|
+
"@fumadocs/story > ts-morph",
|
|
33
|
+
"fumadocs-core > hast-util-to-estree > style-to-js",
|
|
34
|
+
"fumadocs-core > js-yaml > argparse",
|
|
35
|
+
"fumadocs-core > mdast-util-mdx > mdast-util-from-markdown > micromark > debug",
|
|
36
|
+
"fumadocs-core > tinyglobby > picomatch",
|
|
37
|
+
"fumadocs-core > unified > extend",
|
|
38
|
+
"fumadocs-mdx > @mdx-js/mdx > hast-util-to-jsx-runtime > style-to-js",
|
|
39
|
+
"fumadocs-mdx > @mdx-js/mdx > source-map",
|
|
40
|
+
"fumadocs-mdx > esbuild",
|
|
41
|
+
"fumadocs-mdx > js-yaml > argparse",
|
|
42
|
+
"fumadocs-mdx > mdast-util-mdx > mdast-util-from-markdown > micromark > debug",
|
|
43
|
+
"fumadocs-mdx > picocolors",
|
|
44
|
+
"fumadocs-mdx > picomatch",
|
|
45
|
+
"fumadocs-mdx > unified > extend",
|
|
46
|
+
"fumadocs-twoslash > mdast-util-from-markdown > micromark > debug",
|
|
47
|
+
"fumadocs-typescript > hast-util-to-estree > mdast-util-mdx-expression > mdast-util-from-markdown > micromark > debug",
|
|
48
|
+
"fumadocs-typescript > hast-util-to-estree > style-to-js",
|
|
49
|
+
"fumadocs-typescript > ts-morph",
|
|
50
|
+
"fumadocs-typescript > unified > extend"
|
|
51
|
+
],
|
|
52
|
+
"exclude": [
|
|
53
|
+
"@fumadocs/base-ui",
|
|
54
|
+
"@fumadocs/basehub",
|
|
55
|
+
"@fumadocs/local-md",
|
|
56
|
+
"@fumadocs/mdx-remote",
|
|
57
|
+
"@fumadocs/sanity",
|
|
58
|
+
"@fumadocs/story",
|
|
59
|
+
"@fumadocs/tailwind",
|
|
60
|
+
"fumadocs-core",
|
|
61
|
+
"fumadocs-mdx",
|
|
62
|
+
"fumadocs-twoslash",
|
|
63
|
+
"fumadocs-typescript",
|
|
64
|
+
"fumadocs-ui"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
ssr: { "noExternal": [
|
|
68
|
+
"@fumadocs/base-ui",
|
|
69
|
+
"@fumadocs/basehub",
|
|
70
|
+
"@fumadocs/local-md",
|
|
71
|
+
"@fumadocs/mdx-remote",
|
|
72
|
+
"@fumadocs/sanity",
|
|
73
|
+
"@fumadocs/story",
|
|
74
|
+
"@fumadocs/tailwind",
|
|
75
|
+
"fumadocs-core",
|
|
76
|
+
"fumadocs-mdx",
|
|
77
|
+
"fumadocs-twoslash",
|
|
78
|
+
"fumadocs-typescript",
|
|
79
|
+
"fumadocs-ui"
|
|
80
|
+
] }
|
|
81
|
+
};
|
|
82
|
+
async function getConfig(options) {
|
|
83
|
+
const pkgJsonPath = await findClosestPkgJsonPath(options.root);
|
|
84
|
+
if (!pkgJsonPath) return {
|
|
85
|
+
optimizeDeps: {
|
|
86
|
+
include: [],
|
|
87
|
+
exclude: []
|
|
88
|
+
},
|
|
89
|
+
ssr: { noExternal: [] }
|
|
90
|
+
};
|
|
91
|
+
const pkgJson = await readJson(pkgJsonPath).catch((e) => {
|
|
92
|
+
throw new Error(`Unable to read ${pkgJsonPath}`, { cause: e });
|
|
93
|
+
});
|
|
94
|
+
const out = structuredClone(generated_default);
|
|
95
|
+
const deps = /* @__PURE__ */ new Set();
|
|
96
|
+
if (pkgJson.dependencies) for (const name in pkgJson.dependencies) deps.add(name);
|
|
97
|
+
if (pkgJson.devDependencies) for (const name in pkgJson.devDependencies) deps.add(name);
|
|
98
|
+
out.optimizeDeps.include = out.optimizeDeps.include.filter((item) => {
|
|
99
|
+
const first = item.slice(0, item.indexOf(" > "));
|
|
100
|
+
return deps.has(first);
|
|
101
|
+
});
|
|
102
|
+
out.optimizeDeps.exclude = out.optimizeDeps.exclude.filter((item) => deps.has(item));
|
|
103
|
+
out.ssr.noExternal = out.ssr.noExternal.filter((item) => deps.has(item));
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { getConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { L as ExtractedReference, a as EmitOptions, c as PluginContext, d as TransformOptions, i as EmitEntry, l as PluginOption, n as Core, o as EmitOutput, r as CoreOptions, s as Plugin, t as CompilationContext, u as ServerContext } from "./core-
|
|
1
|
+
import { L as ExtractedReference, a as EmitOptions, c as PluginContext, d as TransformOptions, i as EmitEntry, l as PluginOption, n as Core, o as EmitOutput, r as CoreOptions, s as Plugin, t as CompilationContext, u as ServerContext } from "./core-BFnJKNy5.js";
|
|
2
2
|
import { t as CompiledMDXProperties } from "./build-mdx-CDcIdtZ2.js";
|
|
3
3
|
export { type CompilationContext, type CompiledMDXProperties, type Core, type CoreOptions, type EmitEntry, type EmitOptions, type EmitOutput, type ExtractedReference, type Plugin, type PluginContext, type PluginOption, type ServerContext, type TransformOptions };
|
package/dist/next/index.d.ts
CHANGED
package/dist/node/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { f as IndexFilePlugin, m as indexFile, p as IndexFilePluginOptions } from "../core-
|
|
1
|
+
import { f as IndexFilePlugin, m as indexFile, p as IndexFilePluginOptions } from "../core-BFnJKNy5.js";
|
|
2
2
|
export { IndexFilePlugin, IndexFilePluginOptions, indexFile as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as DocCollection, j as DocsCollection } from "../core-
|
|
1
|
+
import { A as DocCollection, j as DocsCollection } from "../core-BFnJKNy5.js";
|
|
2
2
|
import { i as InternalTypeConfig } from "../types-BRJOx-ji.js";
|
|
3
3
|
import { t as CompiledMDXProperties } from "../build-mdx-CDcIdtZ2.js";
|
|
4
4
|
import { FC, ReactNode } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as DocCollection, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, j as DocsCollection, r as CoreOptions, x as ServerOptions } from "../core-
|
|
1
|
+
import { A as DocCollection, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, j as DocsCollection, r as CoreOptions, x as ServerOptions } from "../core-BFnJKNy5.js";
|
|
2
2
|
import { i as InternalTypeConfig, r as FileInfo } from "../types-BRJOx-ji.js";
|
|
3
3
|
import * as _$_standard_schema_spec0 from "@standard-schema/spec";
|
|
4
4
|
import * as _$fumadocs_core_source0 from "fumadocs-core/source";
|
package/dist/runtime/server.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as toFumadocsSource, S as server, _ as DocCollectionEntry, b as ServerCreate, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, v as DocsCollectionEntry, x as ServerOptions, y as MetaCollectionEntry } from "../core-
|
|
1
|
+
import { C as toFumadocsSource, S as server, _ as DocCollectionEntry, b as ServerCreate, g as AsyncDocsCollectionEntry, h as AsyncDocCollectionEntry, v as DocsCollectionEntry, x as ServerOptions, y as MetaCollectionEntry } from "../core-BFnJKNy5.js";
|
|
2
2
|
export { AsyncDocCollectionEntry, AsyncDocsCollectionEntry, DocCollectionEntry, DocsCollectionEntry, MetaCollectionEntry, ServerCreate, ServerOptions, server, toFumadocsSource };
|
package/dist/runtime/server.js
CHANGED
package/dist/vite/index.d.ts
CHANGED
package/dist/vite/index.js
CHANGED
|
@@ -18,7 +18,7 @@ async function mdx(_config, pluginOptions = {}) {
|
|
|
18
18
|
name: "fumadocs-mdx",
|
|
19
19
|
async config() {
|
|
20
20
|
if (!options.updateViteConfig) return;
|
|
21
|
-
const { getConfig } = await import("../dist-
|
|
21
|
+
const { getConfig } = await import("../dist-AsMH2g66.js");
|
|
22
22
|
return getConfig({ root: process.cwd() });
|
|
23
23
|
},
|
|
24
24
|
async buildStart() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.7",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@types/js-yaml": "^4.0.9",
|
|
67
67
|
"@types/mdast": "^4.0.4",
|
|
68
68
|
"@types/mdx": "^2.0.13",
|
|
69
|
-
"@types/node": "^25.
|
|
69
|
+
"@types/node": "^25.8.0",
|
|
70
70
|
"@types/picomatch": "^4.0.3",
|
|
71
71
|
"@types/react": "^19.2.14",
|
|
72
72
|
"mdast-util-directive": "^3.1.0",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"tsdown": "0.22.0",
|
|
80
80
|
"vite": "^8.0.13",
|
|
81
81
|
"webpack": "^5.106.2",
|
|
82
|
-
"@fumadocs/vite": "0.0.
|
|
83
|
-
"fumadocs-core": "16.8.
|
|
82
|
+
"@fumadocs/vite": "0.0.2",
|
|
83
|
+
"fumadocs-core": "16.8.12",
|
|
84
84
|
"tsconfig": "0.0.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
package/dist/dist-B7SYXrlp.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
//#region ../vite/dist/index.js
|
|
4
|
-
async function findClosestPkgJsonPath(dir, predicate) {
|
|
5
|
-
let currentDir = dir.endsWith("package.json") ? path.dirname(dir) : dir;
|
|
6
|
-
while (currentDir) {
|
|
7
|
-
const pkg = path.join(currentDir, "package.json");
|
|
8
|
-
try {
|
|
9
|
-
if ((await fs.stat(pkg)).isFile() && (!predicate || await predicate(pkg))) return pkg;
|
|
10
|
-
} catch {}
|
|
11
|
-
const nextDir = path.dirname(currentDir);
|
|
12
|
-
if (nextDir === currentDir) break;
|
|
13
|
-
currentDir = nextDir;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
async function readJson(pkgJsonPath) {
|
|
17
|
-
return JSON.parse(await fs.readFile(pkgJsonPath, "utf8"));
|
|
18
|
-
}
|
|
19
|
-
var generated_default = {
|
|
20
|
-
optimizeDeps: {
|
|
21
|
-
"include": [
|
|
22
|
-
"@fumadocs/base-ui > rehype-raw > hast-util-raw > hast-util-to-parse5 > comma-separated-tokens",
|
|
23
|
-
"@fumadocs/base-ui > rehype-raw > hast-util-raw > hast-util-to-parse5 > space-separated-tokens",
|
|
24
|
-
"@fumadocs/base-ui > rehype-raw > hast-util-raw > html-void-elements",
|
|
25
|
-
"@fumadocs/base-ui > rehype-raw > hast-util-raw > mdast-util-to-hast > trim-lines",
|
|
26
|
-
"@fumadocs/base-ui > rehype-raw > hast-util-raw > web-namespaces",
|
|
27
|
-
"@fumadocs/base-ui > rehype-raw > hast-util-raw > zwitch",
|
|
28
|
-
"@fumadocs/base-ui > shiki > @shikijs/core > hast-util-to-html > ccount",
|
|
29
|
-
"@fumadocs/base-ui > shiki > @shikijs/core > hast-util-to-html > stringify-entities",
|
|
30
|
-
"@fumadocs/local-md > @mdx-js/mdx > collapse-white-space",
|
|
31
|
-
"@fumadocs/local-md > estree-util-to-js > source-map",
|
|
32
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > comma-separated-tokens",
|
|
33
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > mdast-util-mdx-expression > mdast-util-from-markdown > decode-named-character-reference > character-entities",
|
|
34
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > mdast-util-mdx-expression > mdast-util-from-markdown > micromark > debug",
|
|
35
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > mdast-util-mdx-expression > mdast-util-to-markdown > longest-streak",
|
|
36
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > mdast-util-mdx-expression > mdast-util-to-markdown > zwitch",
|
|
37
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > mdast-util-mdx-jsx > ccount",
|
|
38
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > mdast-util-mdx-jsx > parse-entities",
|
|
39
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > mdast-util-mdx-jsx > stringify-entities",
|
|
40
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > space-separated-tokens",
|
|
41
|
-
"@fumadocs/local-md > hast-util-to-jsx-runtime > style-to-js",
|
|
42
|
-
"@fumadocs/local-md > picomatch",
|
|
43
|
-
"@fumadocs/local-md > remark > unified > bail",
|
|
44
|
-
"@fumadocs/local-md > remark > unified > extend",
|
|
45
|
-
"@fumadocs/local-md > remark-rehype > mdast-util-to-hast > trim-lines",
|
|
46
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > collapse-white-space",
|
|
47
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > hast-util-to-jsx-runtime > comma-separated-tokens",
|
|
48
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > hast-util-to-jsx-runtime > mdast-util-mdx-expression > mdast-util-to-markdown > longest-streak",
|
|
49
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > hast-util-to-jsx-runtime > mdast-util-mdx-jsx > ccount",
|
|
50
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > hast-util-to-jsx-runtime > mdast-util-mdx-jsx > parse-entities",
|
|
51
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > hast-util-to-jsx-runtime > mdast-util-mdx-jsx > stringify-entities",
|
|
52
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > hast-util-to-jsx-runtime > space-separated-tokens",
|
|
53
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > hast-util-to-jsx-runtime > style-to-js",
|
|
54
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > rehype-recma > hast-util-to-estree > zwitch",
|
|
55
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > remark-parse > mdast-util-from-markdown > decode-named-character-reference > character-entities",
|
|
56
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > remark-parse > mdast-util-from-markdown > micromark > debug",
|
|
57
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > remark-rehype > mdast-util-to-hast > trim-lines",
|
|
58
|
-
"@fumadocs/mdx-remote > @mdx-js/mdx > source-map",
|
|
59
|
-
"@fumadocs/mdx-remote > js-yaml > argparse",
|
|
60
|
-
"@fumadocs/mdx-remote > unified > bail",
|
|
61
|
-
"@fumadocs/mdx-remote > unified > extend",
|
|
62
|
-
"@fumadocs/story > ts-morph",
|
|
63
|
-
"fumadocs-core > github-slugger",
|
|
64
|
-
"fumadocs-core > hast-util-to-estree > comma-separated-tokens",
|
|
65
|
-
"fumadocs-core > hast-util-to-estree > mdast-util-mdx-jsx > ccount",
|
|
66
|
-
"fumadocs-core > hast-util-to-estree > mdast-util-mdx-jsx > parse-entities",
|
|
67
|
-
"fumadocs-core > hast-util-to-estree > mdast-util-mdx-jsx > stringify-entities",
|
|
68
|
-
"fumadocs-core > hast-util-to-estree > space-separated-tokens",
|
|
69
|
-
"fumadocs-core > hast-util-to-estree > style-to-js",
|
|
70
|
-
"fumadocs-core > hast-util-to-estree > zwitch",
|
|
71
|
-
"fumadocs-core > js-yaml > argparse",
|
|
72
|
-
"fumadocs-core > mdast-util-mdx > mdast-util-from-markdown > decode-named-character-reference > character-entities",
|
|
73
|
-
"fumadocs-core > mdast-util-mdx > mdast-util-from-markdown > micromark > debug",
|
|
74
|
-
"fumadocs-core > mdast-util-to-markdown > longest-streak",
|
|
75
|
-
"fumadocs-core > remark-gfm > mdast-util-gfm > mdast-util-gfm-table > markdown-table",
|
|
76
|
-
"fumadocs-core > remark-rehype > mdast-util-to-hast > trim-lines",
|
|
77
|
-
"fumadocs-core > shiki > @shikijs/core > hast-util-to-html > html-void-elements",
|
|
78
|
-
"fumadocs-core > tinyglobby > picomatch",
|
|
79
|
-
"fumadocs-core > unified > bail",
|
|
80
|
-
"fumadocs-core > unified > extend",
|
|
81
|
-
"fumadocs-mdx > @mdx-js/mdx > collapse-white-space",
|
|
82
|
-
"fumadocs-mdx > @mdx-js/mdx > hast-util-to-jsx-runtime > comma-separated-tokens",
|
|
83
|
-
"fumadocs-mdx > @mdx-js/mdx > hast-util-to-jsx-runtime > space-separated-tokens",
|
|
84
|
-
"fumadocs-mdx > @mdx-js/mdx > hast-util-to-jsx-runtime > style-to-js",
|
|
85
|
-
"fumadocs-mdx > @mdx-js/mdx > remark-rehype > mdast-util-to-hast > trim-lines",
|
|
86
|
-
"fumadocs-mdx > @mdx-js/mdx > source-map",
|
|
87
|
-
"fumadocs-mdx > esbuild",
|
|
88
|
-
"fumadocs-mdx > js-yaml > argparse",
|
|
89
|
-
"fumadocs-mdx > mdast-util-mdx > mdast-util-from-markdown > decode-named-character-reference > character-entities",
|
|
90
|
-
"fumadocs-mdx > mdast-util-mdx > mdast-util-from-markdown > micromark > debug",
|
|
91
|
-
"fumadocs-mdx > mdast-util-mdx > mdast-util-mdx-jsx > ccount",
|
|
92
|
-
"fumadocs-mdx > mdast-util-mdx > mdast-util-mdx-jsx > parse-entities",
|
|
93
|
-
"fumadocs-mdx > mdast-util-mdx > mdast-util-mdx-jsx > stringify-entities",
|
|
94
|
-
"fumadocs-mdx > mdast-util-mdx > mdast-util-to-markdown > longest-streak",
|
|
95
|
-
"fumadocs-mdx > mdast-util-mdx > mdast-util-to-markdown > zwitch",
|
|
96
|
-
"fumadocs-mdx > picocolors",
|
|
97
|
-
"fumadocs-mdx > picomatch",
|
|
98
|
-
"fumadocs-mdx > unified > bail",
|
|
99
|
-
"fumadocs-mdx > unified > extend",
|
|
100
|
-
"fumadocs-twoslash > @shikijs/twoslash > @shikijs/core > hast-util-to-html > comma-separated-tokens",
|
|
101
|
-
"fumadocs-twoslash > @shikijs/twoslash > @shikijs/core > hast-util-to-html > html-void-elements",
|
|
102
|
-
"fumadocs-twoslash > @shikijs/twoslash > @shikijs/core > hast-util-to-html > space-separated-tokens",
|
|
103
|
-
"fumadocs-twoslash > @shikijs/twoslash > @shikijs/core > hast-util-to-html > stringify-entities",
|
|
104
|
-
"fumadocs-twoslash > mdast-util-from-markdown > decode-named-character-reference > character-entities",
|
|
105
|
-
"fumadocs-twoslash > mdast-util-from-markdown > micromark > debug",
|
|
106
|
-
"fumadocs-twoslash > mdast-util-gfm > mdast-util-gfm-autolink-literal > ccount",
|
|
107
|
-
"fumadocs-twoslash > mdast-util-gfm > mdast-util-gfm-table > markdown-table",
|
|
108
|
-
"fumadocs-twoslash > mdast-util-gfm > mdast-util-to-markdown > longest-streak",
|
|
109
|
-
"fumadocs-twoslash > mdast-util-gfm > mdast-util-to-markdown > zwitch",
|
|
110
|
-
"fumadocs-twoslash > mdast-util-to-hast > trim-lines",
|
|
111
|
-
"fumadocs-typescript > hast-util-to-estree > comma-separated-tokens",
|
|
112
|
-
"fumadocs-typescript > hast-util-to-estree > mdast-util-mdx-expression > mdast-util-from-markdown > decode-named-character-reference > character-entities",
|
|
113
|
-
"fumadocs-typescript > hast-util-to-estree > mdast-util-mdx-expression > mdast-util-from-markdown > micromark > debug",
|
|
114
|
-
"fumadocs-typescript > hast-util-to-estree > mdast-util-mdx-expression > mdast-util-to-markdown > longest-streak",
|
|
115
|
-
"fumadocs-typescript > hast-util-to-estree > mdast-util-mdx-jsx > ccount",
|
|
116
|
-
"fumadocs-typescript > hast-util-to-estree > mdast-util-mdx-jsx > parse-entities",
|
|
117
|
-
"fumadocs-typescript > hast-util-to-estree > mdast-util-mdx-jsx > stringify-entities",
|
|
118
|
-
"fumadocs-typescript > hast-util-to-estree > space-separated-tokens",
|
|
119
|
-
"fumadocs-typescript > hast-util-to-estree > style-to-js",
|
|
120
|
-
"fumadocs-typescript > hast-util-to-estree > zwitch",
|
|
121
|
-
"fumadocs-typescript > remark-rehype > mdast-util-to-hast > trim-lines",
|
|
122
|
-
"fumadocs-typescript > shiki > @shikijs/core > hast-util-to-html > html-void-elements",
|
|
123
|
-
"fumadocs-typescript > ts-morph",
|
|
124
|
-
"fumadocs-typescript > unified > bail",
|
|
125
|
-
"fumadocs-typescript > unified > extend",
|
|
126
|
-
"fumadocs-ui > rehype-raw > hast-util-raw > hast-util-to-parse5 > comma-separated-tokens",
|
|
127
|
-
"fumadocs-ui > rehype-raw > hast-util-raw > hast-util-to-parse5 > space-separated-tokens",
|
|
128
|
-
"fumadocs-ui > rehype-raw > hast-util-raw > html-void-elements",
|
|
129
|
-
"fumadocs-ui > rehype-raw > hast-util-raw > mdast-util-to-hast > trim-lines",
|
|
130
|
-
"fumadocs-ui > rehype-raw > hast-util-raw > web-namespaces",
|
|
131
|
-
"fumadocs-ui > rehype-raw > hast-util-raw > zwitch",
|
|
132
|
-
"fumadocs-ui > shiki > @shikijs/core > hast-util-to-html > ccount",
|
|
133
|
-
"fumadocs-ui > shiki > @shikijs/core > hast-util-to-html > stringify-entities"
|
|
134
|
-
],
|
|
135
|
-
"exclude": [
|
|
136
|
-
"@fumadocs/base-ui",
|
|
137
|
-
"@fumadocs/basehub",
|
|
138
|
-
"@fumadocs/local-md",
|
|
139
|
-
"@fumadocs/mdx-remote",
|
|
140
|
-
"@fumadocs/sanity",
|
|
141
|
-
"@fumadocs/story",
|
|
142
|
-
"@fumadocs/tailwind",
|
|
143
|
-
"fumadocs-core",
|
|
144
|
-
"fumadocs-mdx",
|
|
145
|
-
"fumadocs-twoslash",
|
|
146
|
-
"fumadocs-typescript",
|
|
147
|
-
"fumadocs-ui"
|
|
148
|
-
]
|
|
149
|
-
},
|
|
150
|
-
ssr: { "noExternal": [
|
|
151
|
-
"@fumadocs/base-ui",
|
|
152
|
-
"@fumadocs/basehub",
|
|
153
|
-
"@fumadocs/local-md",
|
|
154
|
-
"@fumadocs/mdx-remote",
|
|
155
|
-
"@fumadocs/sanity",
|
|
156
|
-
"@fumadocs/story",
|
|
157
|
-
"@fumadocs/tailwind",
|
|
158
|
-
"fumadocs-core",
|
|
159
|
-
"fumadocs-mdx",
|
|
160
|
-
"fumadocs-twoslash",
|
|
161
|
-
"fumadocs-typescript",
|
|
162
|
-
"fumadocs-ui"
|
|
163
|
-
] }
|
|
164
|
-
};
|
|
165
|
-
async function getConfig(options) {
|
|
166
|
-
const pkgJsonPath = await findClosestPkgJsonPath(options.root);
|
|
167
|
-
if (!pkgJsonPath) return {
|
|
168
|
-
optimizeDeps: {
|
|
169
|
-
include: [],
|
|
170
|
-
exclude: []
|
|
171
|
-
},
|
|
172
|
-
ssr: { noExternal: [] }
|
|
173
|
-
};
|
|
174
|
-
const pkgJson = await readJson(pkgJsonPath).catch((e) => {
|
|
175
|
-
throw new Error(`Unable to read ${pkgJsonPath}`, { cause: e });
|
|
176
|
-
});
|
|
177
|
-
const out = structuredClone(generated_default);
|
|
178
|
-
const deps = /* @__PURE__ */ new Set();
|
|
179
|
-
if (pkgJson.dependencies) for (const name in pkgJson.dependencies) deps.add(name);
|
|
180
|
-
if (pkgJson.devDependencies) for (const name in pkgJson.devDependencies) deps.add(name);
|
|
181
|
-
out.optimizeDeps.include = out.optimizeDeps.include.filter((item) => {
|
|
182
|
-
const first = item.slice(0, item.indexOf(" > "));
|
|
183
|
-
return deps.has(first);
|
|
184
|
-
});
|
|
185
|
-
out.optimizeDeps.exclude = out.optimizeDeps.exclude.filter((item) => deps.has(item));
|
|
186
|
-
out.ssr.noExternal = out.ssr.noExternal.filter((item) => deps.has(item));
|
|
187
|
-
return out;
|
|
188
|
-
}
|
|
189
|
-
//#endregion
|
|
190
|
-
export { getConfig };
|