@modern-js/main-doc 0.0.0-nightly-20250106160330 → 0.0.0-nightly-20250108160312

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.
@@ -12,28 +12,6 @@ In this chapter, all available Hooks are listed, and you can use the correspondi
12
12
 
13
13
  The following are the common CLI Hooks that can be used in both Modern.js Framework and Modern.js Module.
14
14
 
15
- ### `beforeConfig`
16
-
17
- - Functionality: Running tasks before the config process
18
- - Execution phase: Before the config process
19
- - Hook model: `AsyncWorkflow`
20
- - Type: `AsyncWorkflow<void, void>`
21
- - Example:
22
-
23
- ```ts
24
- import type { CliPlugin } from '@modern-js/core';
25
-
26
- export const myPlugin = (): CliPlugin => ({
27
- setup(api) {
28
- return {
29
- beforeConfig: () => {
30
- // do something
31
- },
32
- };
33
- },
34
- });
35
- ```
36
-
37
15
  ### `config`
38
16
 
39
17
  - Functionality: Collect configuration
@@ -27,7 +27,7 @@ title: 服务端渲染(SSR)
27
27
 
28
28
  ## 开启 SSR
29
29
 
30
- Modenr.js 启用 SSR 非常简单,只需要设置 [`server.ssr`](/configure/app/server/ssr) 为 `true` 即可:
30
+ Modern.js 启用 SSR 非常简单,只需要设置 [`server.ssr`](/configure/app/server/ssr) 为 `true` 即可:
31
31
 
32
32
  ```ts title="modern.config.ts"
33
33
  import { defineConfig } from '@modern-js/app-tools';
@@ -328,4 +328,4 @@ export default function Test() {
328
328
 
329
329
  在浏览器端,这段代码不会造成任何问题,但是在 SSR 时,Middleware 实例会一直无法被销毁。每次渲染组件,调用 `epicMiddleware.run(rootEpic)` 时,都会在内部添加新的事件绑定,导致整个对象不断变大,最终对应用性能造成影响。
330
330
 
331
- CSR 中这类问题不易被发觉,因此从 CSR 切换到 SSR 时,如果不确定应用是否存在这类隐患,可以对应用进行压测。
331
+ CSR 中这类问题不易被发觉,因此从 CSR 切换到 SSR 时,如果不确定应用是否存在这类隐患,可以对应用进行压测。
@@ -12,28 +12,6 @@ Modern.js 工程体系中包含三类插件:CLI、Runtime、Server,每一类
12
12
 
13
13
  以下是通用的 CLI Hooks,可以在 Modern.js Framework 以及 Modern.js Module 中使用。
14
14
 
15
- ### `beforeConfig`
16
-
17
- - 功能:运行收集配置前的任务
18
- - 执行阶段:收集配置前
19
- - Hook 模型:`AsyncWorkflow`
20
- - 类型:`AsyncWorkflow<void, void>`
21
- - 使用示例:
22
-
23
- ```ts
24
- import type { CliPlugin } from '@modern-js/core';
25
-
26
- export const myPlugin = (): CliPlugin => ({
27
- setup(api) {
28
- return {
29
- beforeConfig: () => {
30
- // do something
31
- },
32
- };
33
- },
34
- });
35
- ```
36
-
37
15
  ### `config`
38
16
 
39
17
  - 功能:收集配置
package/package.json CHANGED
@@ -15,14 +15,14 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-nightly-20250106160330",
18
+ "version": "0.0.0-nightly-20250108160312",
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org/",
21
21
  "access": "public",
22
22
  "provenance": true
23
23
  },
24
24
  "dependencies": {
25
- "@modern-js/sandpack-react": "0.0.0-nightly-20250106160330"
25
+ "@modern-js/sandpack-react": "0.0.0-nightly-20250108160312"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@rspress/shared": "1.39.3",