@modern-js/main-doc 3.0.0 → 3.0.1
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/docs/en/configure/app/dev/server.mdx +1 -1
- package/docs/en/configure/app/tools/dev-server.mdx +1 -1
- package/docs/en/guides/basic-features/debug/proxy.mdx +1 -1
- package/docs/zh/configure/app/dev/server.mdx +1 -1
- package/docs/zh/configure/app/tools/dev-server.mdx +1 -1
- package/docs/zh/guides/basic-features/debug/proxy.mdx +1 -1
- package/package.json +6 -5
- package/rspress.config.ts +1 -2
- package/src/components/Mermaid/index.tsx +3 -0
- package/src/index.ts +1 -1
|
@@ -116,7 +116,7 @@ export default {
|
|
|
116
116
|
proxy: {
|
|
117
117
|
// http://localhost:8080/api -> https://example.com/api
|
|
118
118
|
// http://localhost:8080/api/foo -> https://example.com/api/foo
|
|
119
|
-
'/api': 'https://example.com
|
|
119
|
+
'/api': 'https://example.com',
|
|
120
120
|
},
|
|
121
121
|
},
|
|
122
122
|
},
|
|
@@ -102,7 +102,7 @@ export default {
|
|
|
102
102
|
proxy: {
|
|
103
103
|
// http://localhost:8080/api -> https://example.com/api
|
|
104
104
|
// http://localhost:8080/api/foo -> https://example.com/api/foo
|
|
105
|
-
'/api': 'https://example.com
|
|
105
|
+
'/api': 'https://example.com',
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
108
|
},
|
|
@@ -116,7 +116,7 @@ export default {
|
|
|
116
116
|
proxy: {
|
|
117
117
|
// http://localhost:8080/api -> https://example.com/api
|
|
118
118
|
// http://localhost:8080/api/foo -> https://example.com/api/foo
|
|
119
|
-
'/api': 'https://example.com
|
|
119
|
+
'/api': 'https://example.com',
|
|
120
120
|
},
|
|
121
121
|
},
|
|
122
122
|
},
|
|
@@ -102,7 +102,7 @@ export default {
|
|
|
102
102
|
proxy: {
|
|
103
103
|
// http://localhost:8080/api -> https://example.com/api
|
|
104
104
|
// http://localhost:8080/api/foo -> https://example.com/api/foo
|
|
105
|
-
'/api': 'https://example.com
|
|
105
|
+
'/api': 'https://example.com',
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
108
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/main-doc",
|
|
3
3
|
"description": "Documentation of modern.js framework",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"homepage": "https://modernjs.dev",
|
|
5
6
|
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
|
|
6
7
|
"repository": {
|
|
@@ -15,20 +16,20 @@
|
|
|
15
16
|
"modern",
|
|
16
17
|
"modern.js"
|
|
17
18
|
],
|
|
18
|
-
"version": "3.0.
|
|
19
|
+
"version": "3.0.1",
|
|
19
20
|
"publishConfig": {
|
|
20
21
|
"registry": "https://registry.npmjs.org/",
|
|
21
22
|
"access": "public"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"mermaid": "^11.12.2",
|
|
25
|
-
"@modern-js/sandpack-react": "3.0.
|
|
26
|
+
"@modern-js/sandpack-react": "3.0.1"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@rsbuild/plugin-sass": "1.5.0",
|
|
29
|
-
"@rspress/core": "2.0.
|
|
30
|
-
"@rspress/plugin-llms": "2.0.
|
|
31
|
-
"@rspress/shared": "2.0.
|
|
30
|
+
"@rspress/core": "2.0.2",
|
|
31
|
+
"@rspress/plugin-llms": "2.0.2",
|
|
32
|
+
"@rspress/shared": "2.0.2",
|
|
32
33
|
"@shikijs/transformers": "^3.21.0",
|
|
33
34
|
"@types/fs-extra": "9.0.13",
|
|
34
35
|
"@types/node": "^20",
|
package/rspress.config.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { pluginSass } from '@rsbuild/plugin-sass';
|
|
3
3
|
import { defineConfig } from '@rspress/core';
|
|
4
|
-
import { pluginLlms } from '@rspress/plugin-llms';
|
|
5
4
|
import { transformerNotationHighlight } from '@shikijs/transformers';
|
|
6
5
|
|
|
7
6
|
const docPath = path.join(__dirname, 'docs');
|
|
8
7
|
|
|
9
8
|
export default defineConfig({
|
|
10
9
|
root: docPath,
|
|
10
|
+
llms: true,
|
|
11
11
|
title: 'Modern.js',
|
|
12
12
|
description:
|
|
13
13
|
'The Modern.js framework is a progressive web framework based on React. At ByteDance, we use Modern.js to build upper-level frameworks that have supported the development of thousands of web applications.',
|
|
@@ -22,7 +22,6 @@ export default defineConfig({
|
|
|
22
22
|
transformers: [transformerNotationHighlight()],
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
|
-
plugins: [pluginLlms()],
|
|
26
25
|
search: {
|
|
27
26
|
codeBlocks: true,
|
|
28
27
|
},
|
|
@@ -20,6 +20,9 @@ export default function Mermaid({
|
|
|
20
20
|
const [renderError, setRenderError] = useState(false);
|
|
21
21
|
|
|
22
22
|
async function renderMermaid2SVG() {
|
|
23
|
+
if (typeof document === 'undefined') {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
23
26
|
// https://github.com/mermaid-js/mermaid/blob/1b40f552b20df4ab99a986dd58c9d254b3bfd7bc/packages/mermaid/src/docs/.vitepress/theme/Mermaid.vue#L53
|
|
24
27
|
const hasDarkClass = document.documentElement.classList.contains('dark');
|
|
25
28
|
|
package/src/index.ts
CHANGED