@modern-js/main-doc 2.69.5 → 2.69.6

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.
@@ -17,6 +17,10 @@ Compared with `tools.webpack`, **webpack-chain not only supports chained calls,
17
17
 
18
18
  > `tools.webpackChain` is executed earlier than tools.webpack and thus will be overridden by changes in `tools.webpack`.
19
19
 
20
+ :::tip
21
+ Modern.js has deprecated support for webpack, which will be removed in the next major version. It is recommended to use Rspack as the bundler.
22
+ :::
23
+
20
24
  ### Utils
21
25
 
22
26
  #### env
@@ -6,7 +6,7 @@ title: webpack
6
6
 
7
7
  import { Badge } from '@theme';
8
8
 
9
- <Badge type="danger" >Webpack Only</Badge>
9
+ <Badge type="danger">Webpack Only</Badge>
10
10
 
11
11
  - **Type:** `Object | Function | undefined`
12
12
  - **Default:** `undefined`
@@ -15,6 +15,10 @@ import { Badge } from '@theme';
15
15
 
16
16
  > `tools.bundlerChain` is also used to modify the webpack configuration, and the function is more powerful. It is recommended to use `tools.bundlerChain` first.
17
17
 
18
+ :::tip
19
+ Modern.js has deprecated support for webpack, which will be removed in the next major version. It is recommended to use Rspack as the bundler.
20
+ :::
21
+
18
22
  ### Object Type
19
23
 
20
24
  `tools.webpack` can be configured as an object to be deep merged with the built-in webpack configuration through [webpack-merge](https://github.com/survivejs/webpack-merge).
@@ -2,12 +2,12 @@
2
2
  sidebar_position: 2
3
3
  ---
4
4
 
5
- # Build Engine
5
+ # Build Tool
6
6
 
7
- Modern.js internally encapsulates [Rsbuild](https://rsbuild.rs/), and supports seamless switching between Webpack and Rspack bundlers.
7
+ Modern.js internally encapsulates [Rsbuild](https://rsbuild.rs/), and supports seamless switching between Rspack and webpack.
8
8
 
9
- ::: tip What is Rsbuild?
10
- Rsbuild is a build tool based on Rspack. It is an enhanced Rspack CLI, easy-to-use, and ready-to-use out of the box.
9
+ :::tip
10
+ Modern.js has deprecated support for webpack, which will be removed in the next major version. It is recommended to use Rspack as the bundler.
11
11
  :::
12
12
 
13
13
  ## Build Architecture
@@ -16,7 +16,7 @@ From the building perspective, Modern.js can be divided into three-layers, from
16
16
 
17
17
  - Upper-level framework: Modern.js (open source) and EdenX (internal).
18
18
  - Build tool: Rsbuild.
19
- - Bundler: Webpack and Rspack.
19
+ - Bundler: Rspack and webpack.
20
20
 
21
21
  <img
22
22
  src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/build-layers-02193.png"
@@ -7,7 +7,7 @@ sidebar_position: 2
7
7
 
8
8
  ## Environment
9
9
 
10
- import Prerequisites from "@site-docs-en/components/prerequisites"
10
+ import Prerequisites from '@site-docs-en/components/prerequisites';
11
11
 
12
12
  <Prerequisites />
13
13
 
@@ -30,13 +30,13 @@ npx @modern-js/create@latest myapp
30
30
 
31
31
  ## Initialize
32
32
 
33
- import InitApp from "@site-docs-en/components/init-app"
33
+ import InitApp from '@site-docs-en/components/init-app';
34
34
 
35
35
  <InitApp />
36
36
 
37
37
  ## Development
38
38
 
39
- import DebugApp from "@site-docs-en/components/debug-app"
39
+ import DebugApp from '@site-docs-en/components/debug-app';
40
40
 
41
41
  <DebugApp />
42
42
 
@@ -56,9 +56,11 @@ export default defineConfig({
56
56
  server: {
57
57
  ssr: true,
58
58
  },
59
- plugins: [appTools({
60
- bundler: 'rspack', // Set to 'webpack' to enable webpack
61
- }),],
59
+ plugins: [
60
+ appTools({
61
+ bundler: 'rspack',
62
+ }),
63
+ ],
62
64
  });
63
65
  ```
64
66
 
@@ -152,6 +154,6 @@ Open `http://localhost:8080/` in the browser, and the content should be consiste
152
154
 
153
155
  ## Deployment
154
156
 
155
- import Deploy from "@site-docs-en/components/deploy"
157
+ import Deploy from '@site-docs-en/components/deploy';
156
158
 
157
159
  <Deploy />
@@ -38,9 +38,11 @@ We recommend using pnpm for faster installation speed.
38
38
 
39
39
  ## Bundler
40
40
 
41
- Modern.js uses [Webpack 5](https://webpack.js.org/) or [Rspack](https://rspack.rs/) to bundle your web applications.
41
+ Modern.js uses [Rspack](https://rspack.rs/) or [webpack 5](https://webpack.js.org/) to bundle your web applications.
42
42
 
43
- The default bundler used is Webpack 5. You can refer to ["Using Rspack"](/en/guides/advanced-features/rspack-start) to switch to the faster Rspack.
43
+ :::tip
44
+ Modern.js has deprecated support for webpack, which will be removed in the next major version. It is recommended to use Rspack as the bundler.
45
+ :::
44
46
 
45
47
  ## Transpiler
46
48
 
@@ -206,7 +206,7 @@ export default defineConfig({
206
206
  },
207
207
  plugins: [
208
208
  appTools({
209
- bundler: 'rspack', // Set to 'webpack' to enable webpack
209
+ bundler: 'rspack',
210
210
  }),
211
211
  moduleFederationPlugin(),
212
212
  ],
@@ -20,6 +20,10 @@ import { Badge } from '@theme';
20
20
 
21
21
  > `tools.webpackChain` 的执行时机早于 tools.webpack,因此会被 `tools.webpack` 中的修改所覆盖。
22
22
 
23
+ :::tip
24
+ Modern.js 对于 webpack 的支持已经废弃,并将在下一个大版本中移除,推荐优先使用 Rspack 作为打包工具。
25
+ :::
26
+
23
27
  ### 工具集合
24
28
 
25
29
  #### env
@@ -6,7 +6,7 @@ title: webpack
6
6
 
7
7
  import { Badge } from '@theme';
8
8
 
9
- <Badge type="danger" >仅支持 Webpack</Badge>
9
+ <Badge type="danger">仅支持 Webpack</Badge>
10
10
 
11
11
  - **类型:** `Object | Function | undefined`
12
12
  - **默认值:** `undefined`
@@ -15,6 +15,10 @@ import { Badge } from '@theme';
15
15
 
16
16
  > `tools.bundlerChain` 同样可以修改 webpack 配置,并且功能更加强大,建议优先使用 `tools.bundlerChain`。
17
17
 
18
+ :::tip
19
+ Modern.js 对于 webpack 的支持已经废弃,并将在下一个大版本中移除,推荐优先使用 Rspack 作为打包工具。
20
+ :::
21
+
18
22
  ### Object 类型
19
23
 
20
24
  `tools.webpack` 可以配置为一个对象,这个对象将会和内置的 webpack 配置通过 [webpack-merge](https://github.com/survivejs/webpack-merge) 进行深层合并。
@@ -4,10 +4,10 @@ sidebar_position: 2
4
4
 
5
5
  # 构建工具
6
6
 
7
- Modern.js 构建是基于 [Rsbuild](https://rsbuild.rs/) 实现的,并支持在 WebpackRspack 两种打包工具间无缝切换。
7
+ Modern.js 构建是基于 [Rsbuild](https://rsbuild.rs/) 实现的,并支持在 Rspackwebpack 两种打包工具间无缝切换。
8
8
 
9
- :::tip 什么是 Rsbuild
10
- Rsbuild 是基于 Rspack 的构建工具,是一个增强版的 Rspack CLI,更易用、开箱即用。
9
+ :::tip
10
+ Modern.js 对于 webpack 的支持已经废弃,并将在下一个大版本中移除,推荐优先使用 Rspack 作为打包工具。
11
11
  :::
12
12
 
13
13
  ## 构建架构
@@ -16,7 +16,7 @@ Rsbuild 是基于 Rspack 的构建工具,是一个增强版的 Rspack CLI,
16
16
 
17
17
  - 研发框架:Modern.js(开源)和 EdenX(内部)。
18
18
  - 构建工具:Rsbuild。
19
- - 打包工具:WebpackRspack
19
+ - 打包工具:Rspackwebpack
20
20
 
21
21
  <img
22
22
  src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/build-layers-02193.png"
@@ -58,7 +58,7 @@ export default defineConfig({
58
58
  },
59
59
  plugins: [
60
60
  appTools({
61
- bundler: 'rspack', // Set to 'webpack' to enable webpack
61
+ bundler: 'rspack',
62
62
  }),
63
63
  ],
64
64
  });
@@ -38,9 +38,11 @@ Modern.js 可以与社区中任意的包管理器搭配使用,比如 [npm](htt
38
38
 
39
39
  ## 打包工具
40
40
 
41
- Modern.js 使用 [Webpack 5](https://webpack.js.org/) 或 [Rspack](https://rspack.rs/) 来打包你的 Web 应用。
41
+ Modern.js 使用 [Rspack](https://rspack.rs/) 或 [webpack 5](https://webpack.js.org/) 来打包你的 Web 应用。
42
42
 
43
- 默认使用的打包工具为 Webpack 5,你可以参考 [使用 Rspack](/guides/advanced-features/rspack-start) 来切换到更快的 Rspack。
43
+ :::tip
44
+ Modern.js 对于 webpack 的支持已经废弃,并将在下一个大版本中移除,推荐优先使用 Rspack 作为打包工具。
45
+ :::
44
46
 
45
47
  ## 转译工具
46
48
 
@@ -31,7 +31,6 @@ export default defineConfig({
31
31
  moduleFederationPlugin(),
32
32
  ],
33
33
  });
34
-
35
34
  ```
36
35
 
37
36
  ## 生产者导出模块
@@ -205,7 +204,7 @@ export default defineConfig({
205
204
  },
206
205
  plugins: [
207
206
  appTools({
208
- bundler: 'rspack', // Set to 'webpack' to enable webpack
207
+ bundler: 'rspack',
209
208
  }),
210
209
  moduleFederationPlugin(),
211
210
  ],
package/package.json CHANGED
@@ -15,14 +15,14 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.69.5",
18
+ "version": "2.69.6",
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org/",
21
21
  "access": "public"
22
22
  },
23
23
  "dependencies": {
24
24
  "mermaid": "^11.4.1",
25
- "@modern-js/sandpack-react": "2.69.5"
25
+ "@modern-js/sandpack-react": "2.69.6"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@rsbuild/plugin-sass": "1.4.0",