@modern-js/main-doc 2.30.0 → 2.31.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.
- package/CHANGELOG.md +6 -0
- package/docs/en/configure/app/output/enable-inline-route-manifests.mdx +10 -0
- package/docs/en/configure/app/plugins.mdx +2 -1
- package/docs/zh/configure/app/output/enable-inline-route-manifests.mdx +21 -0
- package/docs/zh/configure/app/plugins.mdx +2 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
---
|
2
|
+
sidebar_label: enableInlineRouteManifests
|
3
|
+
---
|
4
|
+
|
5
|
+
# output.enableInlineRouteManifests
|
6
|
+
|
7
|
+
- **Type:** `boolean`
|
8
|
+
- **Default:** `true`
|
9
|
+
|
10
|
+
When using convention-based routing, the framework injects routing information into the client for optimization purposes. By default, routing information is injected into the html, but when this is configured to `false`, routing information is injected into a separate JS file.
|
@@ -17,7 +17,8 @@ Refer to [How to Develop Plugins](/guides/topic-detail/framework-plugin/implemen
|
|
17
17
|
This option is used to configure framework plugins. If you need to configure other types of plugins, please choose the corresponding configuration method:
|
18
18
|
|
19
19
|
- To configure Modern.js Builder plugins, use the [builderPlugins](/configure/app/builder-plugins) option.
|
20
|
-
- To configure webpack plugins, use the [tools.webpack](/configure/app/tools/webpack) or [tools.
|
20
|
+
- To configure webpack plugins, use the [tools.webpack](/configure/app/tools/webpack)、[tools.webpackChain](/configure/app/tools/webpack-chain) or [tools.bundlerChain](/configure/app/tools/bundler-chain) options.
|
21
|
+
- To configure Rspack plugins, use the [tools.rspack](/configure/app/tools/rspack) or [tools.bundlerChain](/configure/app/tools/bundler-chain) options.
|
21
22
|
- To configure Babel plugins, use the [tools.babel](/configure/app/tools/babel) option.
|
22
23
|
|
23
24
|
## Plugin types
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
sidebar_label: enableInlineRouteManifests
|
3
|
+
---
|
4
|
+
|
5
|
+
# output.enableInlineRouteManifests
|
6
|
+
|
7
|
+
- **类型:** `boolean`
|
8
|
+
- **默认值:** `true`
|
9
|
+
|
10
|
+
当使用约定式路由时,框架为了做一些优化,会向客户端中注入路由信息,默认情况下路由信息会注入到 html 中,
|
11
|
+
当该配置为 `false` 时,路由信息会注入到一个单独的 JS 文件中。
|
12
|
+
|
13
|
+
Example:
|
14
|
+
|
15
|
+
```ts
|
16
|
+
export default {
|
17
|
+
output: {
|
18
|
+
enableInlineRouteManifests: false,
|
19
|
+
},
|
20
|
+
}
|
21
|
+
```
|
@@ -17,7 +17,8 @@ sidebar_position: 9
|
|
17
17
|
该选项**用于配置框架插件**,如果你需要配置其他类型的插件,请选择对应的配置方式:
|
18
18
|
|
19
19
|
- 配置 Modern.js Builder 插件,请使用 [builderPlugins](/configure/app/builder-plugins) 配置项。
|
20
|
-
- 配置 webpack 插件,请使用 [tools.webpack](/configure/app/tools/webpack) 或 [tools.
|
20
|
+
- 配置 webpack 插件,请使用 [tools.webpack](/configure/app/tools/webpack)、[tools.webpackChain](/configure/app/tools/webpack-chain) 或 [tools.bundlerChain](/configure/app/tools/bundler-chain) 配置项。
|
21
|
+
- 配置 Rspack 插件,请使用 [tools.rspack](/configure/app/tools/rspack) 或 [tools.bundlerChain](/configure/app/tools/bundler-chain) 配置项。
|
21
22
|
- 配置 Babel 插件,请使用 [tools.babel](/configure/app/tools/babel) 配置项。
|
22
23
|
|
23
24
|
## 插件类型
|
package/package.json
CHANGED
@@ -15,14 +15,14 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.
|
18
|
+
"version": "2.31.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.
|
25
|
+
"@modern-js/builder-doc": "^2.31.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.
|
38
|
-
"@modern-js/doc-tools": "2.
|
39
|
-
"@modern-js/doc-plugin-auto-sidebar": "2.
|
37
|
+
"@modern-js/builder-doc": "2.31.0",
|
38
|
+
"@modern-js/doc-tools": "2.31.0",
|
39
|
+
"@modern-js/doc-plugin-auto-sidebar": "2.31.0"
|
40
40
|
},
|
41
41
|
"scripts": {
|
42
42
|
"dev": "modern dev",
|