mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 23:49:51 +00:00
MDX: Refactor internal export paths
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-mdx': patch
|
||||
---
|
||||
|
||||
Refactor internal export paths
|
||||
@@ -33,9 +33,13 @@
|
||||
"types": "./dist/vite/index.d.ts",
|
||||
"require": "./dist/vite/index.cjs"
|
||||
},
|
||||
".": {
|
||||
"import": "./dist/runtime/next/index.js",
|
||||
"types": "./dist/runtime/next/index.d.ts"
|
||||
},
|
||||
"./runtime/async": {
|
||||
"import": "./dist/runtime/async.js",
|
||||
"types": "./dist/runtime/async.d.ts"
|
||||
"import": "./dist/runtime/next/async.js",
|
||||
"types": "./dist/runtime/next/async.d.ts"
|
||||
},
|
||||
"./runtime/vite": {
|
||||
"browser": "./dist/runtime/vite/browser.js",
|
||||
@@ -49,11 +53,6 @@
|
||||
"./bun": {
|
||||
"import": "./dist/bun/index.js",
|
||||
"types": "./dist/bun/index.d.ts"
|
||||
},
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"require": "./dist/index.cjs"
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export * from './runtime';
|
||||
@@ -5,7 +5,7 @@ import type { LoadedConfig } from '@/utils/config';
|
||||
import type { DocCollection, MetaCollection } from '@/config';
|
||||
import { validate } from '@/utils/validation';
|
||||
import { fileCache } from '@/map/file-cache';
|
||||
import type { AsyncRuntimeFile, FileInfo } from '@/runtime/types';
|
||||
import type { AsyncRuntimeFile, FileInfo } from '@/runtime/next/types';
|
||||
import { load } from 'js-yaml';
|
||||
import { getGitTimestamp } from '@/utils/git-timestamp';
|
||||
import { fumaMatter } from '@/utils/fuma-matter';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { LoadedConfig } from '@/utils/config';
|
||||
import { type StructuredData } from 'fumadocs-core/mdx-plugins';
|
||||
import { _runtime, createMDXSource } from '@/runtime/index';
|
||||
import type { RuntimeAsync } from '@/runtime/types';
|
||||
import { _runtime, createMDXSource } from './index';
|
||||
import type { RuntimeAsync } from './types';
|
||||
import { buildMDX } from '@/utils/build-mdx';
|
||||
import type { ProcessorOptions } from '@mdx-js/mdx';
|
||||
import { executeMdx } from '@fumadocs/mdx-remote/client';
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
type PageData,
|
||||
type Source,
|
||||
} from 'fumadocs-core/source';
|
||||
import type { BaseCollectionEntry, FileInfo, Runtime } from '@/runtime/types';
|
||||
import type { BaseCollectionEntry, FileInfo, Runtime } from './types';
|
||||
import fs from 'node:fs';
|
||||
|
||||
const cache = new Map<string, string>();
|
||||
@@ -16,7 +16,7 @@ export interface FileInfo {
|
||||
absolutePath: string;
|
||||
}
|
||||
|
||||
interface MarkdownProps
|
||||
export interface MarkdownProps
|
||||
extends Omit<CompiledMDXProperties, 'frontmatter' | 'default'> {
|
||||
body: CompiledMDXProperties['default'];
|
||||
}
|
||||
@@ -6,7 +6,7 @@ export default defineConfig({
|
||||
'./src/{config,next,vite,bun}/index.ts',
|
||||
'./src/node/loader.ts',
|
||||
'./src/config/zod-3.ts',
|
||||
'./src/runtime/async.ts',
|
||||
'./src/runtime/next/{index,async}.ts',
|
||||
'./src/runtime/vite/{browser,server}.ts',
|
||||
],
|
||||
format: ['esm', 'cjs'],
|
||||
|
||||
Reference in New Issue
Block a user