@modern-js/main-doc 2.28.0 → 2.29.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @modern-js/main-doc
2
2
 
3
+ ## 2.29.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @modern-js/builder-doc@2.29.0
8
+
3
9
  ## 2.28.0
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,13 @@
1
+ ---
2
+ sidebar_label: dnsPrefetch
3
+ ---
4
+
5
+ # performance.dnsPrefetch
6
+
7
+ :::tip
8
+ This config is provided by Modern.js Builder, more detail can see [performance.dnsPrefetch](https://modernjs.dev/builder/en/api/config-performance.html#performancednsprefetch).
9
+ :::
10
+
11
+ import Main from '@modern-js/builder-doc/docs/en/config/performance/dnsPrefetch.md';
12
+
13
+ <Main />
@@ -0,0 +1,13 @@
1
+ ---
2
+ sidebar_label: preconnect
3
+ ---
4
+
5
+ # performance.preconnect
6
+
7
+ :::tip
8
+ This config is provided by Modern.js Builder, more detail can see [performance.preconnect](https://modernjs.dev/builder/en/api/config-performance.html#performancepreconnect).
9
+ :::
10
+
11
+ import Main from '@modern-js/builder-doc/docs/en/config/performance/preconnect.md';
12
+
13
+ <Main />
@@ -108,3 +108,16 @@ In most cases, peer dependencies warnings will not affect the project operation
108
108
  - If you are still using React 16, you will not be able to use Modern.js's runtime or server-side capabilities. You can consider using the build mode of Modern.js, that is, only using Modern.js's build capabilities. In this case, React 16 can still be used.
109
109
 
110
110
  In future major versions of Modern.js, we will gradually remove support for React 16 and React 17. Therefore, please upgrade to React 18 or higher as soon as possible.
111
+
112
+ ---
113
+
114
+ ### Type error in Modern.js configuration file?
115
+
116
+ ```bash
117
+ Type 'CliPlugin<{}, {}, {}, {}>' is not assignable to type 'CliPlugin<any, {}, {}, {}>'.
118
+ Types of property 'setup' are incompatible.
119
+ ```
120
+
121
+ When you use the Modern.js framework, the above error occurs in the configuration file, it may be due to the inconsistent versions of Modern.js related packages。You can upgrade and unify the version of modern.js related packages through `npx modern upgrade` command.
122
+
123
+ In the monorepo, the above error may also occur due to inconsistent versions of the Modern.js framework used by different sub-projects.
@@ -0,0 +1,13 @@
1
+ ---
2
+ sidebar_label: dnsPrefetch
3
+ ---
4
+
5
+ # performance.dnsPrefetch
6
+
7
+ :::tip
8
+ 该配置由 Modern.js Builder 提供,更多信息可参考 [performance.dnsPrefetch](https://modernjs.dev/builder/api/config-performance.html#performancednsprefetch)。
9
+ :::
10
+
11
+ import Main from '@modern-js/builder-doc/docs/zh/config/performance/dnsPrefetch.md';
12
+
13
+ <Main />
@@ -0,0 +1,13 @@
1
+ ---
2
+ sidebar_label: preconnect
3
+ ---
4
+
5
+ # performance.preconnect
6
+
7
+ :::tip
8
+ 该配置由 Modern.js Builder 提供,更多信息可参考 [performance.preconnect](https://modernjs.dev/builder/api/config-performance.html#performancepreconnect)。
9
+ :::
10
+
11
+ import Main from '@modern-js/builder-doc/docs/zh/config/performance/preconnect.md';
12
+
13
+ <Main />
@@ -108,3 +108,16 @@ Type '{}' is not assignable to type 'ReactNode'.
108
108
  - 如果你仍然在使用 React 16,那么将无法使用 Modern.js 的运行时或服务端能力。你可以考虑使用 Modern.js 的构建模式,即只使用 Modern.js 的构建能力,这种情况可以继续使用 React 16。
109
109
 
110
110
  在 Modern.js 未来的 major 版本中,我们会逐步移除对 React 16 和 React 17 的支持。因此,请尽快升级到 React 18 以上版本。
111
+
112
+ ---
113
+
114
+ ### Modern.js 配置出现类型错误?
115
+
116
+ ```bash
117
+ Type 'CliPlugin<{}, {}, {}, {}>' is not assignable to type 'CliPlugin<any, {}, {}, {}>'.
118
+ Types of property 'setup' are incompatible.
119
+ ```
120
+
121
+ 当你在使用 Modern.js 框架时配置文件出现以上报错,可能是由于 Modern.js 相关包的版本号未统一导致。可以通过 `npx modern upgrade` 命令对 modern.js 依赖进行升级和版本统一。
122
+
123
+ 在 monorepo 中由于不同子项目所用的 Modern.js 框架版本不一致也可能出现以上问题。
package/package.json CHANGED
@@ -15,14 +15,14 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.28.0",
18
+ "version": "2.29.0",
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org/",
21
21
  "access": "public",
22
22
  "provenance": true
23
23
  },
24
24
  "peerDependencies": {
25
- "@modern-js/builder-doc": "^2.28.0"
25
+ "@modern-js/builder-doc": "^2.29.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "classnames": "^2",
@@ -34,9 +34,9 @@
34
34
  "fs-extra": "^10",
35
35
  "@types/node": "^16",
36
36
  "@types/fs-extra": "^9",
37
- "@modern-js/builder-doc": "2.28.0",
38
- "@modern-js/doc-plugin-auto-sidebar": "2.28.0",
39
- "@modern-js/doc-tools": "2.28.0"
37
+ "@modern-js/builder-doc": "2.29.0",
38
+ "@modern-js/doc-tools": "2.29.0",
39
+ "@modern-js/doc-plugin-auto-sidebar": "2.29.0"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "modern dev",