@bleedingdev/modern-js-main-doc 3.2.0-ultramodern.99 → 3.4.0-ultramodern.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 (101) hide show
  1. package/docs/en/apis/app/commands.mdx +59 -69
  2. package/docs/en/community/blog/v2-release-note.mdx +5 -5
  3. package/docs/en/community/blog/v3-release-note.mdx +1 -1
  4. package/docs/en/community/releases.mdx +1 -5
  5. package/docs/en/components/build-output.mdx +1 -1
  6. package/docs/en/components/debug-app.mdx +1 -1
  7. package/docs/en/components/deploy-command.mdx +3 -3
  8. package/docs/en/components/init-app.mdx +23 -51
  9. package/docs/en/components/prerequisites.mdx +1 -1
  10. package/docs/en/components/serve-command.mdx +3 -3
  11. package/docs/en/configure/app/bff/effect.mdx +27 -3
  12. package/docs/en/configure/app/performance/rsdoctor.mdx +7 -4
  13. package/docs/en/configure/app/tools/ts-checker.mdx +30 -2
  14. package/docs/en/configure/app/usage.mdx +6 -6
  15. package/docs/en/guides/advanced-features/bff/data-platform.mdx +3 -1
  16. package/docs/en/guides/advanced-features/bff/frameworks.mdx +3 -1
  17. package/docs/en/guides/advanced-features/international/api.mdx +1 -1
  18. package/docs/en/guides/advanced-features/international/configuration.mdx +1 -1
  19. package/docs/en/guides/advanced-features/international/locale-detection.mdx +1 -1
  20. package/docs/en/guides/advanced-features/international/routing.mdx +5 -3
  21. package/docs/en/guides/advanced-features/web-server.mdx +12 -0
  22. package/docs/en/guides/basic-features/debug/rsdoctor.mdx +2 -3
  23. package/docs/en/guides/basic-features/debug/using-storybook.mdx +1 -1
  24. package/docs/en/guides/basic-features/deploy.mdx +14 -14
  25. package/docs/en/guides/basic-features/env-vars.mdx +2 -2
  26. package/docs/en/guides/basic-features/render/_meta.json +1 -10
  27. package/docs/en/guides/basic-features/render/overview.mdx +0 -1
  28. package/docs/en/guides/basic-features/render/rsc.mdx +0 -1
  29. package/docs/en/guides/basic-features/routes/config-routes.mdx +2 -2
  30. package/docs/en/guides/basic-features/routes/routes.mdx +25 -10
  31. package/docs/en/guides/basic-features/testing/rstest.mdx +29 -0
  32. package/docs/en/guides/concept/server.mdx +2 -2
  33. package/docs/en/guides/get-started/quick-start.mdx +1 -1
  34. package/docs/en/guides/get-started/ultramodern.mdx +135 -26
  35. package/docs/en/guides/topic-detail/module-federation/application.mdx +1 -1
  36. package/docs/en/guides/topic-detail/module-federation/deploy.mdx +2 -2
  37. package/docs/en/guides/topic-detail/module-federation/usage.mdx +5 -5
  38. package/docs/en/guides/troubleshooting/builder.mdx +1 -1
  39. package/docs/en/guides/upgrade/config.mdx +1 -2
  40. package/docs/en/guides/upgrade/other.mdx +4 -4
  41. package/docs/zh/apis/app/commands.mdx +56 -66
  42. package/docs/zh/community/blog/v2-release-note.mdx +5 -5
  43. package/docs/zh/community/blog/v3-release-note.mdx +1 -1
  44. package/docs/zh/community/releases.mdx +1 -5
  45. package/docs/zh/components/build-output.mdx +1 -1
  46. package/docs/zh/components/debug-app.mdx +1 -1
  47. package/docs/zh/components/deploy-command.mdx +3 -3
  48. package/docs/zh/components/init-app.mdx +16 -47
  49. package/docs/zh/components/prerequisites.mdx +1 -1
  50. package/docs/zh/components/serve-command.mdx +3 -3
  51. package/docs/zh/configure/app/bff/effect.mdx +26 -2
  52. package/docs/zh/configure/app/performance/rsdoctor.mdx +7 -4
  53. package/docs/zh/configure/app/tools/ts-checker.mdx +30 -2
  54. package/docs/zh/configure/app/usage.mdx +6 -6
  55. package/docs/zh/guides/advanced-features/bff/data-platform.mdx +3 -1
  56. package/docs/zh/guides/advanced-features/bff/frameworks.mdx +3 -1
  57. package/docs/zh/guides/advanced-features/international/api.mdx +1 -1
  58. package/docs/zh/guides/advanced-features/international/configuration.mdx +1 -1
  59. package/docs/zh/guides/advanced-features/international/locale-detection.mdx +1 -1
  60. package/docs/zh/guides/advanced-features/international/routing.mdx +5 -3
  61. package/docs/zh/guides/advanced-features/web-server.mdx +12 -0
  62. package/docs/zh/guides/basic-features/debug/rsdoctor.mdx +2 -3
  63. package/docs/zh/guides/basic-features/debug/using-storybook.mdx +1 -1
  64. package/docs/zh/guides/basic-features/deploy.mdx +13 -13
  65. package/docs/zh/guides/basic-features/env-vars.mdx +2 -2
  66. package/docs/zh/guides/basic-features/render/_meta.json +1 -10
  67. package/docs/zh/guides/basic-features/render/overview.mdx +0 -1
  68. package/docs/zh/guides/basic-features/render/rsc.mdx +0 -1
  69. package/docs/zh/guides/basic-features/routes/config-routes.mdx +2 -2
  70. package/docs/zh/guides/basic-features/routes/routes.mdx +25 -10
  71. package/docs/zh/guides/basic-features/testing/rstest.mdx +29 -0
  72. package/docs/zh/guides/concept/server.mdx +2 -2
  73. package/docs/zh/guides/get-started/quick-start.mdx +1 -1
  74. package/docs/zh/guides/get-started/ultramodern.mdx +121 -22
  75. package/docs/zh/guides/topic-detail/module-federation/application.mdx +1 -1
  76. package/docs/zh/guides/topic-detail/module-federation/deploy.mdx +2 -2
  77. package/docs/zh/guides/topic-detail/module-federation/usage.mdx +5 -5
  78. package/docs/zh/guides/troubleshooting/builder.mdx +1 -1
  79. package/docs/zh/guides/upgrade/config.mdx +1 -2
  80. package/docs/zh/guides/upgrade/other.md +4 -4
  81. package/package.json +17 -14
  82. package/rspress.config.ts +17 -5
  83. package/src/components/Footer/index.tsx +3 -3
  84. package/src/components/Footer/styles.module.scss +1 -1
  85. package/src/components/Mermaid/style.scss +52 -52
  86. package/src/components/RandomMemberList/index.module.scss +8 -8
  87. package/src/components/SecondaryTitle/index.module.css +7 -2
  88. package/src/components/ShowcaseList/index.module.scss +1 -1
  89. package/src/components/ShowcaseList/useShowcases.ts +23 -65
  90. package/src/i18n/enUS.ts +0 -9
  91. package/src/i18n/zhCN.ts +0 -9
  92. package/src/pages/index.module.scss +6 -6
  93. package/src/sandbox/csr-auth/src/routes/page-tsx.txt +1 -1
  94. package/static/img/logo.svg +7 -0
  95. package/static/img/social-card.svg +12 -0
  96. package/builder-doc/docs/en/config/performance/rsdoctor.md +0 -37
  97. package/builder-doc/docs/zh/config/performance/rsdoctor.md +0 -37
  98. package/docs/en/guides/basic-features/render/tanstack-rsc.mdx +0 -226
  99. package/docs/zh/guides/basic-features/render/tanstack-rsc.mdx +0 -226
  100. package/main-doc/docs/en/guides/get-started/ultramodern.mdx +0 -403
  101. package/main-doc/docs/zh/guides/get-started/ultramodern.mdx +0 -363
@@ -1,41 +1,29 @@
1
- .dark {
2
- .modern-mermaid {
3
- .flowchart-label {
4
- rect {
5
- fill: #23272f !important;
6
- stroke: #81b1db !important;
7
- stroke-width: 1px !important;
8
- }
9
-
10
- polygon {
11
- fill: #23272f !important;
12
- stroke: #81b1db !important;
13
- stroke-width: 1px !important;
14
- }
15
-
16
- span.nodeLabel {
17
- color: #ccc !important;
18
- }
19
- }
1
+ .modern-mermaid {
2
+ font-size: 20px;
3
+ text-align: center;
4
+ svg {
5
+ display: block;
6
+ margin: 0 auto;
7
+ }
8
+ }
20
9
 
21
- .edgeLabel {
22
- fill: #23272f !important;
23
- color: #ccc !important;
24
- background-color: #23272f !important;
25
- }
10
+ .modern-doc {
11
+ .flowchart-link {
12
+ stroke: #666 !important;
13
+ }
26
14
 
27
- .flowchart-link {
28
- stroke: #ccc !important;
29
- }
15
+ .marker {
16
+ stroke: #666 !important;
17
+ fill: #666 !important;
18
+ }
30
19
 
31
- .marker {
32
- stroke: #ccc !important;
33
- fill: #ccc !important;
20
+ .cluster {
21
+ rect {
22
+ fill: transparent !important;
23
+ stroke: #666 !important;
34
24
  }
35
25
  }
36
- }
37
26
 
38
- .modern-doc {
39
27
  .modern-mermaid {
40
28
  svg {
41
29
  display: block;
@@ -114,20 +102,41 @@
114
102
  }
115
103
  }
116
104
  }
105
+ }
117
106
 
118
- .flowchart-link {
119
- stroke: #666 !important;
120
- }
107
+ .dark {
108
+ .modern-mermaid {
109
+ .flowchart-link {
110
+ stroke: #ccc !important;
111
+ }
121
112
 
122
- .marker {
123
- stroke: #666 !important;
124
- fill: #666 !important;
125
- }
113
+ .marker {
114
+ stroke: #ccc !important;
115
+ fill: #ccc !important;
116
+ }
126
117
 
127
- .cluster {
128
- rect {
129
- fill: transparent !important;
130
- stroke: #666 !important;
118
+ .flowchart-label {
119
+ rect {
120
+ fill: #23272f !important;
121
+ stroke: #81b1db !important;
122
+ stroke-width: 1px !important;
123
+ }
124
+
125
+ polygon {
126
+ fill: #23272f !important;
127
+ stroke: #81b1db !important;
128
+ stroke-width: 1px !important;
129
+ }
130
+
131
+ span.nodeLabel {
132
+ color: #ccc !important;
133
+ }
134
+ }
135
+
136
+ .edgeLabel {
137
+ fill: #23272f !important;
138
+ color: #ccc !important;
139
+ background-color: #23272f !important;
131
140
  }
132
141
  }
133
142
  }
@@ -210,12 +219,3 @@
210
219
  }
211
220
  }
212
221
  }
213
-
214
- .modern-mermaid {
215
- font-size: 20px;
216
- text-align: center;
217
- svg {
218
- display: block;
219
- margin: 0 auto;
220
- }
221
- }
@@ -4,6 +4,14 @@
4
4
  align-items: center;
5
5
  }
6
6
 
7
+ .avatar {
8
+ width: 48px;
9
+ height: 48px;
10
+ border-radius: 999px;
11
+ transition: all 0.2s ease-in-out;
12
+ background-color: #f8f8f8;
13
+ }
14
+
7
15
  .link {
8
16
  display: flex;
9
17
  align-items: center;
@@ -20,14 +28,6 @@
20
28
  }
21
29
  }
22
30
 
23
- .avatar {
24
- width: 48px;
25
- height: 48px;
26
- border-radius: 999px;
27
- transition: all 0.2s ease-in-out;
28
- background-color: #f8f8f8;
29
- }
30
-
31
31
  .name {
32
32
  margin-top: 12px;
33
33
  font-size: 13px;
@@ -1,8 +1,13 @@
1
1
  .titleWrap {
2
2
  display: flex;
3
3
  justify-content: space-between;
4
- background-image: url(https://lf3-static.bytednsdoc.com/obj/eden-cn/aphqeh7uhohpquloj/modern-js/text-bg.png);
5
- background-size: 374px 32.7px;
4
+ background-image: linear-gradient(
5
+ 90deg,
6
+ rgba(20, 184, 166, 0.36),
7
+ rgba(14, 165, 233, 0.18) 58%,
8
+ transparent
9
+ );
10
+ background-size: min(374px, 100%) 32.7px;
6
11
  background-repeat: no-repeat;
7
12
  }
8
13
  .title {
@@ -63,7 +63,7 @@
63
63
  -webkit-text-fill-color: transparent;
64
64
  }
65
65
 
66
- :global(.dark) .type {
66
+ [class~='dark'] .type {
67
67
  background: -webkit-linear-gradient(
68
68
  305deg,
69
69
  hsl(166deg, 77%, 53%) 10%,
@@ -1,4 +1,4 @@
1
- import { useI18n } from '../../i18n';
1
+ import { withBase } from '@rspress/core/runtime';
2
2
 
3
3
  export type ShowcaseType = 'framework' | 'builder' | 'doc' | 'module';
4
4
 
@@ -10,92 +10,50 @@ export type ShowcaseItem = {
10
10
  };
11
11
 
12
12
  export const useShowcases = (): ShowcaseItem[] => {
13
- const t = useI18n();
13
+ const preview = (name: string) => withBase(`/img/features/${name}.svg`);
14
14
 
15
15
  return [
16
16
  {
17
- name: 'Tiktok Seller',
18
- url: 'https://seller-us-accounts.tiktok.com/',
19
- preview:
20
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/tiktok-seller-showcase-08172.png',
17
+ name: 'UltraModern.js',
18
+ url: 'https://bleedingdev.github.io/ultramodern.js/',
19
+ preview: preview('framework'),
21
20
  type: 'framework',
22
21
  },
23
22
  {
24
- name: 'Tiktok Streamer',
25
- url: 'https://shop.tiktok.com/streamer/welcome',
26
- preview:
27
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/tiktok-steamer-showcase-08172.png',
23
+ name: 'Effect',
24
+ url: 'https://effect.website/',
25
+ preview: preview('api'),
28
26
  type: 'framework',
29
27
  },
30
28
  {
31
- name: 'Tiktok Shop Partner',
32
- url: 'https://partner-us.tiktok.com/',
33
- preview:
34
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/tiktok-shop-partner-0817.png',
35
- type: 'framework',
36
- },
37
- {
38
- name: t('doubao'),
39
- url: 'https://www.doubao.com/',
40
- preview:
41
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/doubao-showcase-0817.png',
42
- type: 'framework',
43
- },
44
- {
45
- name: t('volctrans'),
46
- url: 'https://translate.volcengine.com/',
47
- preview:
48
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/volctrans-0424.jpeg',
49
- type: 'framework',
50
- },
51
- {
52
- name: t('writingo'),
53
- url: 'https://writingo.net/',
54
- preview:
55
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/writingo-0424.jpeg',
29
+ name: 'TanStack Router',
30
+ url: 'https://tanstack.com/router',
31
+ preview: preview('url'),
56
32
  type: 'framework',
57
33
  },
58
34
  {
59
35
  name: 'Rspack',
60
36
  url: 'https://rspack.rs/',
61
- preview:
62
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/rspack-0424.jpeg',
37
+ preview: preview('compiler'),
38
+ type: 'builder',
39
+ },
40
+ {
41
+ name: 'Rspress',
42
+ url: 'https://rspress.rs/',
43
+ preview: preview('visual'),
63
44
  type: 'doc',
64
45
  },
65
46
  {
66
47
  name: 'Modern.js',
67
48
  url: 'https://modernjs.dev/en/',
68
- preview:
69
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/modernjs-dev-0425.jpeg',
49
+ preview: preview('app'),
70
50
  type: 'doc',
71
51
  },
72
52
  {
73
- name: t('shidianbaike'),
74
- url: 'https://shidian.baike.com/',
75
- preview:
76
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/shidianbaike-0424.jpeg',
77
- type: 'framework',
78
- },
79
- {
80
- name: t('xiaohe'),
81
- url: 'https://xiaohe.cn/',
82
- preview:
83
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/xiaohe-0424.png',
84
- type: 'framework',
85
- },
86
- {
87
- name: t('dongchedi'),
88
- url: 'https://m.dcdapp.com/motor/feoffline/usedcar_channel/channel.html',
89
- preview:
90
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/dongchedi-0425.png',
91
- type: 'builder',
92
- },
93
- {
94
- name: t('volcengineDeveloper'),
95
- url: 'https://developer.volcengine.com/',
96
- preview:
97
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/developer-volcengine-0425.png',
98
- type: 'framework',
53
+ name: 'Module Federation',
54
+ url: 'https://module-federation.io/',
55
+ preview: preview('frameworks'),
56
+ type: 'module',
99
57
  },
100
58
  ];
101
59
  };
package/src/i18n/enUS.ts CHANGED
@@ -43,13 +43,4 @@ export const EN_US = {
43
43
  pluginSystem: 'Plugin System',
44
44
  githubDiscussion: 'Github Discussion',
45
45
  changelog: 'Changelog',
46
-
47
- // Showcases
48
- doubao: 'Doubao',
49
- writingo: 'Writingo',
50
- volctrans: 'Volctrans',
51
- shidianbaike: 'Shidian Baike',
52
- xiaohe: 'Xiaohe',
53
- dongchedi: 'Dongchedi',
54
- volcengineDeveloper: 'Volcengine Developer',
55
46
  } as const;
package/src/i18n/zhCN.ts CHANGED
@@ -42,13 +42,4 @@ export const ZH_CN: Record<keyof typeof EN_US, string> = {
42
42
  pluginSystem: '插件系统',
43
43
  githubDiscussion: 'Github 讨论区',
44
44
  changelog: '更新日志',
45
-
46
- // Showcase
47
- doubao: '豆包',
48
- writingo: '火山写作',
49
- volctrans: '火山翻译',
50
- shidianbaike: '识典百科',
51
- xiaohe: '小荷健康',
52
- dongchedi: '懂车帝',
53
- volcengineDeveloper: '火山引擎开发者社区',
54
45
  };
@@ -56,7 +56,7 @@
56
56
  }
57
57
  }
58
58
 
59
- :global(.dark) .announcement {
59
+ [class~='dark'] .announcement {
60
60
  background: linear-gradient(
61
61
  150.85deg,
62
62
  rgba(124, 178, 250, 0.18) 3%,
@@ -93,7 +93,7 @@
93
93
  color: rgba(0, 0, 0, 0.75);
94
94
  }
95
95
 
96
- :global(.dark) .announcementText {
96
+ [class~='dark'] .announcementText {
97
97
  color: rgba(255, 255, 255, 0.85);
98
98
  }
99
99
 
@@ -107,7 +107,7 @@
107
107
  }
108
108
  }
109
109
 
110
- :global(.dark) .announcementArrow {
110
+ [class~='dark'] .announcementArrow {
111
111
  color: rgba(255, 255, 255, 0.5);
112
112
  }
113
113
 
@@ -125,7 +125,7 @@
125
125
  .mask {
126
126
  position: absolute;
127
127
  background-image: conic-gradient(
128
- from 180deg at 50%50%,
128
+ from 180deg at 50% 50%,
129
129
  var(--edenx-primary-color) 0deg,
130
130
  180deg,
131
131
  hsl(198deg, 100%, 50%) 0deg
@@ -144,7 +144,7 @@
144
144
  pointer-events: none;
145
145
  }
146
146
 
147
- :global(.dark) .mask {
147
+ [class~='dark'] .mask {
148
148
  opacity: 0.15;
149
149
  }
150
150
 
@@ -346,6 +346,6 @@
346
346
  }
347
347
  }
348
348
 
349
- :global(.rspress-logo) {
349
+ [class~='rspress-logo'] {
350
350
  width: auto !important;
351
351
  }
@@ -7,7 +7,7 @@ const PublicPage = (): JSX.Element => (
7
7
  <link
8
8
  rel="icon"
9
9
  type="image/x-icon"
10
- href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"
10
+ href="https://bleedingdev.github.io/ultramodern.js/img/favicon.ico"
11
11
  />
12
12
  </Helmet>
13
13
  <h3>Public</h3>
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="220" height="48" viewBox="0 0 220 48" role="img" aria-labelledby="title">
2
+ <title id="title">UltraModern.js</title>
3
+ <rect width="48" height="48" rx="12" fill="#0f172a"/>
4
+ <path fill="#14b8a6" d="M13 13h7v13c0 5 2.6 8 7 8s7-3 7-8V13h7v13c0 8.8-5.6 14-14 14s-14-5.2-14-14V13z"/>
5
+ <path fill="#38bdf8" d="M31 13h8v27h-8V13z"/>
6
+ <text x="60" y="31" fill="#0f172a" font-family="Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-size="23" font-weight="700">UltraModern.js</text>
7
+ </svg>
@@ -0,0 +1,12 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630" role="img" aria-labelledby="title desc">
2
+ <title id="title">UltraModern.js 3.0</title>
3
+ <desc id="desc">A SuperApp framework for Effect, TanStack Router, SSR, BFF, and Micro Verticals.</desc>
4
+ <rect width="1200" height="630" fill="#0f172a"/>
5
+ <path fill="#14b8a6" opacity=".22" d="M0 360c180-92 330-116 498-48 173 70 310 61 480-22 77-38 149-58 222-62v402H0V360z"/>
6
+ <path fill="#38bdf8" opacity=".18" d="M0 438c160-54 316-49 468 15 160 67 337 67 531 0 74-26 141-39 201-40v217H0V438z"/>
7
+ <rect x="86" y="90" width="96" height="96" rx="24" fill="#020617"/>
8
+ <path fill="#14b8a6" d="M111 116h15v35c0 13 7 21 18 21s18-8 18-21v-35h15v35c0 22-13 35-33 35s-33-13-33-35v-35z"/>
9
+ <path fill="#38bdf8" d="M157 116h18v70h-18v-70z"/>
10
+ <text x="86" y="284" fill="#f8fafc" font-family="Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-size="76" font-weight="800">UltraModern.js 3.0</text>
11
+ <text x="90" y="360" fill="#cbd5e1" font-family="Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-size="35" font-weight="500">Effect, TanStack Router, SSR, BFF, and Micro Verticals.</text>
12
+ </svg>
@@ -1,37 +0,0 @@
1
- - **Type:** `boolean | { enabled?: boolean; disableClientServer?: boolean; reportDir?: string; mode?: 'normal' | 'brief' | 'lite' }`
2
- - **Default:** enabled in production build, disabled in development build
3
-
4
- Configure [Rsdoctor](https://rsdoctor.dev/) diagnostics for build.
5
-
6
- - This config only takes effect when using the Rspack provider.
7
- - `disableClientServer` defaults to `true` to avoid hanging the build process after report generation.
8
- - `reportDir` lets you move diagnostics artifacts to a deterministic directory.
9
- - `mode` controls RsDoctor report mode (`normal`, `brief`, `lite`).
10
- - Modern.js writes a machine-readable diagnostics contract artifact to:
11
- - `<reportDir or outputPath>/.rsdoctor/ultramodern-diagnostics.json`
12
- - This contract points coding agents and tools to `.rsdoctor/manifest.json`.
13
-
14
- ### Example
15
-
16
- ```js
17
- export default {
18
- performance: {
19
- rsdoctor: {
20
- enabled: true,
21
- disableClientServer: true,
22
- reportDir: './artifacts',
23
- mode: 'brief',
24
- },
25
- },
26
- };
27
- ```
28
-
29
- You can also use a boolean:
30
-
31
- ```js
32
- export default {
33
- performance: {
34
- rsdoctor: false,
35
- },
36
- };
37
- ```
@@ -1,37 +0,0 @@
1
- - **类型:** `boolean | { enabled?: boolean; disableClientServer?: boolean; reportDir?: string; mode?: 'normal' | 'brief' | 'lite' }`
2
- - **默认值:** 生产构建默认开启,开发构建默认关闭
3
-
4
- 用于配置 [Rsdoctor](https://rsdoctor.dev/) 构建诊断。
5
-
6
- - 该配置仅在使用 Rspack provider 时生效。
7
- - `disableClientServer` 默认值为 `true`,用于避免报告生成后构建进程不退出。
8
- - `reportDir` 可将诊断产物输出到确定的目录。
9
- - `mode` 用于控制 RsDoctor 报告模式(`normal`、`brief`、`lite`)。
10
- - Modern.js 会额外生成机器可读诊断契约文件:
11
- - `<reportDir 或 outputPath>/.rsdoctor/ultramodern-diagnostics.json`
12
- - 该文件可指向 `.rsdoctor/manifest.json`,便于开发者工具与编码代理稳定消费。
13
-
14
- ### 示例
15
-
16
- ```js
17
- export default {
18
- performance: {
19
- rsdoctor: {
20
- enabled: true,
21
- disableClientServer: true,
22
- reportDir: './artifacts',
23
- mode: 'brief',
24
- },
25
- },
26
- };
27
- ```
28
-
29
- 也可以直接使用布尔值:
30
-
31
- ```js
32
- export default {
33
- performance: {
34
- rsdoctor: false,
35
- },
36
- };
37
- ```