@hanzo/docs-mdx 14.1.0

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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/dist/bin.d.ts +1 -0
  3. package/dist/bin.js +16 -0
  4. package/dist/build-mdx-LN7FEKIP.js +8 -0
  5. package/dist/build-mdx-RXJZQXGA.js +8 -0
  6. package/dist/bun/index.d.ts +25 -0
  7. package/dist/bun/index.js +52 -0
  8. package/dist/chunk-4JSFLXXT.js +8 -0
  9. package/dist/chunk-5OBUOALK.js +141 -0
  10. package/dist/chunk-72JS4QVZ.js +17 -0
  11. package/dist/chunk-7I4W7XGI.js +179 -0
  12. package/dist/chunk-7W73RILB.js +173 -0
  13. package/dist/chunk-A3YIGE7S.js +334 -0
  14. package/dist/chunk-AOTZP2TV.js +152 -0
  15. package/dist/chunk-AXJB5MGS.js +173 -0
  16. package/dist/chunk-DMIIE3XZ.js +179 -0
  17. package/dist/chunk-DTFUANSF.js +40 -0
  18. package/dist/chunk-JWZR25CW.js +116 -0
  19. package/dist/chunk-K7N6GD4M.js +17 -0
  20. package/dist/chunk-LXB7WYAF.js +334 -0
  21. package/dist/chunk-MYAVS2LD.js +116 -0
  22. package/dist/chunk-OLD35ARB.js +116 -0
  23. package/dist/chunk-PW2AZGGD.js +125 -0
  24. package/dist/chunk-RGBNABKS.js +334 -0
  25. package/dist/chunk-RPUM7REY.js +40 -0
  26. package/dist/chunk-RR2X6AE6.js +274 -0
  27. package/dist/chunk-S7KOJHHO.js +89 -0
  28. package/dist/chunk-STUCUTJQ.js +334 -0
  29. package/dist/chunk-T6G5VOED.js +116 -0
  30. package/dist/chunk-U5YPLCO5.js +89 -0
  31. package/dist/chunk-UB55AMXC.js +274 -0
  32. package/dist/chunk-VITVHHR6.js +334 -0
  33. package/dist/chunk-VKSHE52K.js +274 -0
  34. package/dist/chunk-VWJKRQZR.js +19 -0
  35. package/dist/chunk-WAAWFNDX.js +179 -0
  36. package/dist/chunk-WGXYJGSZ.js +141 -0
  37. package/dist/chunk-WLJ6EKOZ.js +17 -0
  38. package/dist/chunk-WMYYALAS.js +334 -0
  39. package/dist/chunk-Y7ISNZ7X.js +216 -0
  40. package/dist/chunk-YKRCQ42E.js +216 -0
  41. package/dist/chunk-ZAYZWFWP.js +89 -0
  42. package/dist/config/index.d.ts +18 -0
  43. package/dist/config/index.js +63 -0
  44. package/dist/core-BQcKaqmC.d.ts +350 -0
  45. package/dist/core-BhWOtait.d.ts +350 -0
  46. package/dist/core-CV8uFMUa.d.ts +350 -0
  47. package/dist/core-DAQ64Hkq.d.ts +350 -0
  48. package/dist/core-DZtRjhds.d.ts +350 -0
  49. package/dist/core-De5K4ixv.d.ts +350 -0
  50. package/dist/core-X5ggQtBM.d.ts +350 -0
  51. package/dist/index-BqkSNsGO.d.ts +8 -0
  52. package/dist/index.d.ts +61 -0
  53. package/dist/index.js +0 -0
  54. package/dist/load-from-file-FHW724YY.js +8 -0
  55. package/dist/load-from-file-S5CQ4H6T.js +8 -0
  56. package/dist/next/index.cjs +1165 -0
  57. package/dist/next/index.d.ts +33 -0
  58. package/dist/next/index.js +181 -0
  59. package/dist/node/loader.d.ts +5 -0
  60. package/dist/node/loader.js +41 -0
  61. package/dist/plugins/index-file.d.ts +14 -0
  62. package/dist/plugins/index-file.js +8 -0
  63. package/dist/plugins/json-schema.d.ts +31 -0
  64. package/dist/plugins/json-schema.js +80 -0
  65. package/dist/plugins/last-modified.d.ts +40 -0
  66. package/dist/plugins/last-modified.js +89 -0
  67. package/dist/runtime/browser.d.ts +53 -0
  68. package/dist/runtime/browser.js +67 -0
  69. package/dist/runtime/dynamic.d.ts +27 -0
  70. package/dist/runtime/dynamic.js +79 -0
  71. package/dist/runtime/server.d.ts +14 -0
  72. package/dist/runtime/server.js +8 -0
  73. package/dist/runtime/types.d.ts +61 -0
  74. package/dist/runtime/types.js +0 -0
  75. package/dist/vite/index.d.ts +44 -0
  76. package/dist/vite/index.js +122 -0
  77. package/dist/webpack/mdx.d.ts +6 -0
  78. package/dist/webpack/mdx.js +37 -0
  79. package/dist/webpack/meta.d.ts +6 -0
  80. package/dist/webpack/meta.js +40 -0
  81. package/loader-mdx.cjs +7 -0
  82. package/loader-meta.cjs +7 -0
  83. package/package.json +137 -0
@@ -0,0 +1,274 @@
1
+ import {
2
+ ident
3
+ } from "./chunk-PW2AZGGD.js";
4
+
5
+ // src/utils/validation.ts
6
+ var ValidationError = class extends Error {
7
+ constructor(message, issues) {
8
+ super(
9
+ `${message}:
10
+ ${issues.map((issue) => ` ${issue.path}: ${issue.message}`).join("\n")}`
11
+ );
12
+ this.title = message;
13
+ this.issues = issues;
14
+ }
15
+ async toStringFormatted() {
16
+ const picocolorsModule = await import("picocolors");
17
+ const picocolors = picocolorsModule.default ?? picocolorsModule;
18
+ return [
19
+ picocolors.bold(`[MDX] ${this.title}:`),
20
+ ...this.issues.map(
21
+ (issue) => picocolors.redBright(
22
+ `- ${picocolors.bold(issue.path?.join(".") ?? "*")}: ${issue.message}`
23
+ )
24
+ )
25
+ ].join("\n");
26
+ }
27
+ };
28
+ async function validate(schema, data, context, errorMessage) {
29
+ if (typeof schema === "function" && !("~standard" in schema)) {
30
+ schema = schema(context);
31
+ }
32
+ if ("~standard" in schema) {
33
+ const result = await schema["~standard"].validate(
34
+ data
35
+ );
36
+ if (result.issues) {
37
+ throw new ValidationError(errorMessage, result.issues);
38
+ }
39
+ return result.value;
40
+ }
41
+ return data;
42
+ }
43
+
44
+ // src/core.ts
45
+ import path from "path";
46
+ import fs from "fs/promises";
47
+ var _Defaults = {
48
+ configPath: "source.config.ts",
49
+ outDir: ".source"
50
+ };
51
+ async function getPlugins(pluginOptions) {
52
+ const plugins = [];
53
+ for await (const option of pluginOptions) {
54
+ if (!option) continue;
55
+ if (Array.isArray(option)) plugins.push(...await getPlugins(option));
56
+ else plugins.push(option);
57
+ }
58
+ return plugins;
59
+ }
60
+ function createCore(options) {
61
+ let config;
62
+ let plugins;
63
+ const workspaces = /* @__PURE__ */ new Map();
64
+ async function transformMetadata({
65
+ collection,
66
+ filePath,
67
+ source
68
+ }, data) {
69
+ if (collection.schema) {
70
+ data = await validate(
71
+ collection.schema,
72
+ data,
73
+ { path: filePath, source },
74
+ collection.type === "doc" ? `invalid frontmatter in ${filePath}` : `invalid data in ${filePath}`
75
+ );
76
+ }
77
+ return data;
78
+ }
79
+ return {
80
+ /**
81
+ * Convenient cache store, reset when config changes
82
+ */
83
+ cache: /* @__PURE__ */ new Map(),
84
+ async init({ config: newConfig }) {
85
+ config = await newConfig;
86
+ this.cache.clear();
87
+ workspaces.clear();
88
+ plugins = await getPlugins([
89
+ postprocessPlugin(),
90
+ options.plugins,
91
+ config.global.plugins
92
+ ]);
93
+ for (const plugin of plugins) {
94
+ const out = await plugin.config?.call(this.getPluginContext(), config);
95
+ if (out) config = out;
96
+ }
97
+ if (!options.workspace) {
98
+ await Promise.all(
99
+ Object.entries(config.workspaces).map(async ([name, workspace]) => {
100
+ const core = createCore({
101
+ ...options,
102
+ outDir: path.join(options.outDir, name),
103
+ workspace: {
104
+ name,
105
+ parent: this,
106
+ dir: workspace.dir
107
+ }
108
+ });
109
+ await core.init({ config: workspace.config });
110
+ workspaces.set(name, core);
111
+ })
112
+ );
113
+ }
114
+ },
115
+ getWorkspaces() {
116
+ return workspaces;
117
+ },
118
+ getOptions() {
119
+ return options;
120
+ },
121
+ getConfig() {
122
+ return config;
123
+ },
124
+ /**
125
+ * The file path of compiled config file, the file may not exist (e.g. on Vite, or still compiling)
126
+ */
127
+ getCompiledConfigPath() {
128
+ return path.join(options.outDir, "source.config.mjs");
129
+ },
130
+ getPlugins() {
131
+ return plugins;
132
+ },
133
+ getCollections() {
134
+ return Array.from(config.collections.values());
135
+ },
136
+ getCollection(name) {
137
+ return config.collections.get(name);
138
+ },
139
+ getPluginContext() {
140
+ return {
141
+ core: this
142
+ };
143
+ },
144
+ async initServer(server) {
145
+ const ctx = this.getPluginContext();
146
+ for (const plugin of plugins) {
147
+ await plugin.configureServer?.call(ctx, server);
148
+ }
149
+ for (const workspace of workspaces.values()) {
150
+ await workspace.initServer(server);
151
+ }
152
+ },
153
+ async emit(emitOptions = {}) {
154
+ const { filterPlugin, filterWorkspace, write = false } = emitOptions;
155
+ const start = performance.now();
156
+ const ctx = this.getPluginContext();
157
+ const added = /* @__PURE__ */ new Set();
158
+ const out = {
159
+ entries: [],
160
+ workspaces: {}
161
+ };
162
+ for (const li of await Promise.all(
163
+ plugins.map((plugin) => {
164
+ if (filterPlugin && !filterPlugin(plugin) || !plugin.emit) return;
165
+ return plugin.emit.call(ctx);
166
+ })
167
+ )) {
168
+ if (!li) continue;
169
+ for (const item of li) {
170
+ if (added.has(item.path)) continue;
171
+ out.entries.push(item);
172
+ added.add(item.path);
173
+ }
174
+ }
175
+ if (write) {
176
+ await Promise.all(
177
+ out.entries.map(async (entry) => {
178
+ const file = path.join(options.outDir, entry.path);
179
+ await fs.mkdir(path.dirname(file), { recursive: true });
180
+ await fs.writeFile(file, entry.content);
181
+ })
182
+ );
183
+ console.log(
184
+ options.workspace ? `[MDX: ${options.workspace.name}] generated files in ${performance.now() - start}ms` : `[MDX] generated files in ${performance.now() - start}ms`
185
+ );
186
+ }
187
+ for (const [name, workspace] of workspaces) {
188
+ if (filterWorkspace && !filterWorkspace(name)) continue;
189
+ out.workspaces[name] = (await workspace.emit(emitOptions)).entries;
190
+ }
191
+ return out;
192
+ },
193
+ async transformMeta(options2, data) {
194
+ const ctx = {
195
+ ...this.getPluginContext(),
196
+ ...options2
197
+ };
198
+ data = await transformMetadata(options2, data);
199
+ for (const plugin of plugins) {
200
+ if (plugin.meta?.transform)
201
+ data = await plugin.meta.transform.call(ctx, data) ?? data;
202
+ }
203
+ return data;
204
+ },
205
+ async transformFrontmatter(options2, data) {
206
+ const ctx = {
207
+ ...this.getPluginContext(),
208
+ ...options2
209
+ };
210
+ data = await transformMetadata(options2, data);
211
+ for (const plugin of plugins) {
212
+ if (plugin.doc?.frontmatter)
213
+ data = await plugin.doc.frontmatter.call(ctx, data) ?? data;
214
+ }
215
+ return data;
216
+ },
217
+ async transformVFile(options2, file) {
218
+ const ctx = {
219
+ ...this.getPluginContext(),
220
+ ...options2
221
+ };
222
+ for (const plugin of plugins) {
223
+ if (plugin.doc?.vfile)
224
+ file = await plugin.doc.vfile.call(ctx, file) ?? file;
225
+ }
226
+ return file;
227
+ }
228
+ };
229
+ }
230
+ function postprocessPlugin() {
231
+ const LinkReferenceTypes = `{
232
+ /**
233
+ * extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
234
+ */
235
+ extractedReferences: import("fumadocs-mdx").ExtractedReference[];
236
+ }`;
237
+ return {
238
+ "index-file": {
239
+ generateTypeConfig() {
240
+ const lines = [];
241
+ lines.push("{");
242
+ lines.push(" DocData: {");
243
+ for (const collection of this.core.getCollections()) {
244
+ let postprocessOptions;
245
+ switch (collection.type) {
246
+ case "doc":
247
+ postprocessOptions = collection.postprocess;
248
+ break;
249
+ case "docs":
250
+ postprocessOptions = collection.docs.postprocess;
251
+ break;
252
+ }
253
+ if (postprocessOptions?.extractLinkReferences) {
254
+ lines.push(ident(`${collection.name}: ${LinkReferenceTypes},`, 2));
255
+ }
256
+ }
257
+ lines.push(" }");
258
+ lines.push("}");
259
+ return lines.join("\n");
260
+ },
261
+ serverOptions(options) {
262
+ options.doc ??= {};
263
+ options.doc.passthroughs ??= [];
264
+ options.doc.passthroughs.push("extractedReferences");
265
+ }
266
+ }
267
+ };
268
+ }
269
+
270
+ export {
271
+ ValidationError,
272
+ _Defaults,
273
+ createCore
274
+ };
@@ -0,0 +1,19 @@
1
+ // src/utils/fuma-matter.ts
2
+ import { load } from "js-yaml";
3
+ var regex = /^---\r?\n(.+?)\r?\n---\r?\n/s;
4
+ function fumaMatter(input) {
5
+ const output = { matter: "", data: {}, content: input };
6
+ const match = regex.exec(input);
7
+ if (!match) {
8
+ return output;
9
+ }
10
+ output.matter = match[0];
11
+ output.content = input.slice(match[0].length);
12
+ const loaded = load(match[1]);
13
+ output.data = loaded ?? {};
14
+ return output;
15
+ }
16
+
17
+ export {
18
+ fumaMatter
19
+ };
@@ -0,0 +1,179 @@
1
+ import {
2
+ ValidationError
3
+ } from "./chunk-VKSHE52K.js";
4
+
5
+ // src/loaders/adapter.ts
6
+ import { fileURLToPath } from "url";
7
+ import fs from "fs/promises";
8
+ import { parse } from "querystring";
9
+ import path from "path";
10
+ import { readFileSync } from "fs";
11
+ function toNode(loader) {
12
+ return async (url, _context, nextLoad) => {
13
+ if (url.startsWith("file:///") && (!loader.test || loader.test.test(url))) {
14
+ const parsedUrl = new URL(url);
15
+ const filePath = fileURLToPath(parsedUrl);
16
+ const result = await loader.load({
17
+ filePath,
18
+ query: Object.fromEntries(parsedUrl.searchParams.entries()),
19
+ async getSource() {
20
+ return (await fs.readFile(filePath)).toString();
21
+ },
22
+ development: false,
23
+ compiler: {
24
+ addDependency() {
25
+ }
26
+ }
27
+ });
28
+ if (result) {
29
+ return {
30
+ source: result.code,
31
+ format: "module",
32
+ shortCircuit: true
33
+ };
34
+ }
35
+ }
36
+ return nextLoad(url);
37
+ };
38
+ }
39
+ function toVite(loader) {
40
+ return {
41
+ filter(id) {
42
+ return !loader.test || loader.test.test(id);
43
+ },
44
+ async transform(value, id) {
45
+ const [file, query = ""] = id.split("?", 2);
46
+ const result = await loader.load({
47
+ filePath: file,
48
+ query: parse(query),
49
+ getSource() {
50
+ return value;
51
+ },
52
+ development: this.environment.mode === "dev",
53
+ compiler: {
54
+ addDependency: (file2) => {
55
+ this.addWatchFile(file2);
56
+ }
57
+ }
58
+ });
59
+ if (result === null) return null;
60
+ return {
61
+ code: result.code,
62
+ map: result.map
63
+ };
64
+ }
65
+ };
66
+ }
67
+ function toWebpack(loader) {
68
+ return async function(source, callback) {
69
+ try {
70
+ const result = await loader.load({
71
+ filePath: this.resourcePath,
72
+ query: parse(this.resourceQuery.slice(1)),
73
+ getSource() {
74
+ return source;
75
+ },
76
+ development: this.mode === "development",
77
+ compiler: this
78
+ });
79
+ if (result === null) {
80
+ callback(void 0, source);
81
+ } else {
82
+ callback(void 0, result.code, result.map);
83
+ }
84
+ } catch (error) {
85
+ if (error instanceof ValidationError) {
86
+ return callback(new Error(await error.toStringFormatted()));
87
+ }
88
+ if (!(error instanceof Error)) throw error;
89
+ const fpath = path.relative(this.context, this.resourcePath);
90
+ error.message = `${fpath}:${error.name}: ${error.message}`;
91
+ callback(error);
92
+ }
93
+ };
94
+ }
95
+ function toBun(loader) {
96
+ function toResult(output) {
97
+ if (!output) return;
98
+ return {
99
+ contents: output.code,
100
+ loader: "js"
101
+ };
102
+ }
103
+ return (build) => {
104
+ build.onLoad({ filter: loader.test ?? /.+/ }, (args) => {
105
+ const [filePath, query = ""] = args.path.split("?", 2);
106
+ const input = {
107
+ async getSource() {
108
+ return Bun.file(filePath).text();
109
+ },
110
+ query: parse(query),
111
+ filePath,
112
+ development: false,
113
+ compiler: {
114
+ addDependency() {
115
+ }
116
+ }
117
+ };
118
+ if (loader.bun?.load) {
119
+ return loader.bun.load(readFileSync(filePath).toString(), input);
120
+ }
121
+ const result = loader.load(input);
122
+ if (result instanceof Promise) {
123
+ return result.then(toResult);
124
+ }
125
+ return toResult(result);
126
+ });
127
+ };
128
+ }
129
+
130
+ // src/loaders/config.ts
131
+ import fs2 from "fs/promises";
132
+ function createStandaloneConfigLoader({
133
+ core,
134
+ buildConfig,
135
+ mode
136
+ }) {
137
+ let prev;
138
+ async function getConfigHash() {
139
+ if (mode === "production") return "static";
140
+ const stats = await fs2.stat(core.getOptions().configPath).catch(() => {
141
+ throw new Error("Cannot find config file");
142
+ });
143
+ return stats.mtime.getTime().toString();
144
+ }
145
+ return {
146
+ async getCore() {
147
+ const hash = await getConfigHash();
148
+ if (!prev || hash !== prev.hash) {
149
+ prev = {
150
+ hash,
151
+ init: (async () => {
152
+ const { loadConfig } = await import("./load-from-file-FHW724YY.js");
153
+ await core.init({
154
+ config: loadConfig(core, buildConfig)
155
+ });
156
+ })()
157
+ };
158
+ }
159
+ await prev.init;
160
+ return core;
161
+ }
162
+ };
163
+ }
164
+ function createIntegratedConfigLoader(core) {
165
+ return {
166
+ async getCore() {
167
+ return core;
168
+ }
169
+ };
170
+ }
171
+
172
+ export {
173
+ toNode,
174
+ toVite,
175
+ toWebpack,
176
+ toBun,
177
+ createStandaloneConfigLoader,
178
+ createIntegratedConfigLoader
179
+ };
@@ -0,0 +1,141 @@
1
+ // src/runtime/server.ts
2
+ import * as path from "path";
3
+ function server(options = {}) {
4
+ const { doc: { passthroughs: docPassthroughs = [] } = {} } = options;
5
+ function fileInfo(file, base) {
6
+ if (file.startsWith("./")) {
7
+ file = file.slice(2);
8
+ }
9
+ return {
10
+ path: file,
11
+ fullPath: path.join(base, file)
12
+ };
13
+ }
14
+ function mapDocData(entry) {
15
+ const data = {
16
+ body: entry.default,
17
+ toc: entry.toc,
18
+ structuredData: entry.structuredData,
19
+ _exports: entry
20
+ };
21
+ for (const key of docPassthroughs) {
22
+ data[key] = entry[key];
23
+ }
24
+ return data;
25
+ }
26
+ return {
27
+ async doc(_name, base, glob) {
28
+ const out = await Promise.all(
29
+ Object.entries(glob).map(async ([k, v]) => {
30
+ const data = typeof v === "function" ? await v() : v;
31
+ return {
32
+ ...mapDocData(data),
33
+ ...data.frontmatter,
34
+ ...createDocMethods(fileInfo(k, base), () => data)
35
+ };
36
+ })
37
+ );
38
+ return out;
39
+ },
40
+ async docLazy(_name, base, head, body) {
41
+ const out = await Promise.all(
42
+ Object.entries(head).map(async ([k, v]) => {
43
+ const data = typeof v === "function" ? await v() : v;
44
+ const content = body[k];
45
+ return {
46
+ ...data,
47
+ ...createDocMethods(fileInfo(k, base), content),
48
+ async load() {
49
+ return mapDocData(await content());
50
+ }
51
+ };
52
+ })
53
+ );
54
+ return out;
55
+ },
56
+ async meta(_name, base, glob) {
57
+ const out = await Promise.all(
58
+ Object.entries(glob).map(async ([k, v]) => {
59
+ const data = typeof v === "function" ? await v() : v;
60
+ return {
61
+ info: fileInfo(k, base),
62
+ ...data
63
+ };
64
+ })
65
+ );
66
+ return out;
67
+ },
68
+ async docs(name, base, metaGlob, docGlob) {
69
+ const entry = {
70
+ docs: await this.doc(name, base, docGlob),
71
+ meta: await this.meta(name, base, metaGlob),
72
+ toDocsSource() {
73
+ return toDocsSource(this.docs, this.meta);
74
+ }
75
+ };
76
+ return entry;
77
+ },
78
+ async docsLazy(name, base, metaGlob, docHeadGlob, docBodyGlob) {
79
+ const entry = {
80
+ docs: await this.docLazy(name, base, docHeadGlob, docBodyGlob),
81
+ meta: await this.meta(name, base, metaGlob),
82
+ toDocsSource() {
83
+ return toDocsSource(this.docs, this.meta);
84
+ }
85
+ };
86
+ return entry;
87
+ }
88
+ };
89
+ }
90
+ function toDocsSource(pages, metas) {
91
+ const files = [];
92
+ for (const entry of pages) {
93
+ files.push({
94
+ type: "page",
95
+ path: entry.info.path,
96
+ absolutePath: entry.info.fullPath,
97
+ data: entry
98
+ });
99
+ }
100
+ for (const entry of metas) {
101
+ files.push({
102
+ type: "meta",
103
+ path: entry.info.path,
104
+ absolutePath: entry.info.fullPath,
105
+ data: entry
106
+ });
107
+ }
108
+ return {
109
+ files
110
+ };
111
+ }
112
+ function createDocMethods(info, load) {
113
+ return {
114
+ info,
115
+ async getText(type) {
116
+ if (type === "raw") {
117
+ const fs = await import("fs/promises");
118
+ return (await fs.readFile(info.fullPath)).toString();
119
+ }
120
+ const data = await load();
121
+ if (typeof data._markdown !== "string")
122
+ throw new Error(
123
+ "getText('processed') requires `includeProcessedMarkdown` to be enabled in your collection config."
124
+ );
125
+ return data._markdown;
126
+ },
127
+ async getMDAST() {
128
+ const data = await load();
129
+ if (!data._mdast)
130
+ throw new Error(
131
+ "getMDAST() requires `includeMDAST` to be enabled in your collection config."
132
+ );
133
+ return JSON.parse(data._mdast);
134
+ }
135
+ };
136
+ }
137
+
138
+ export {
139
+ server,
140
+ toDocsSource
141
+ };
@@ -0,0 +1,17 @@
1
+ import {
2
+ createCore
3
+ } from "./chunk-RR2X6AE6.js";
4
+
5
+ // src/webpack/index.ts
6
+ var core;
7
+ function getCore(options) {
8
+ return core ??= createCore({
9
+ environment: "webpack",
10
+ outDir: options.outDir,
11
+ configPath: options.configPath
12
+ });
13
+ }
14
+
15
+ export {
16
+ getCore
17
+ };