@modern-js/main-doc 0.0.0-next-1686121516109 → 0.0.0-next-1686150559103

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @modern-js/main-doc
2
2
 
3
- ## 0.0.0-next-1686121516109
3
+ ## 0.0.0-next-1686150559103
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  docs: 修复 reset command 翻译问题
10
10
 
11
- - 31b5230f4: docs(main): update concept doc
11
+ - bce7a1274: docs(main): update concept doc
12
12
 
13
13
  docs(main): 更新核心概念文档
14
14
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  - Updated dependencies [bd4b15040]
24
24
  - Updated dependencies [2ede584c3]
25
- - @modern-js/builder-doc@0.0.0-next-1686121516109
25
+ - @modern-js/builder-doc@0.0.0-next-1686150559103
26
26
 
27
27
  ## 2.22.0
28
28
 
@@ -0,0 +1,13 @@
1
+ ---
2
+ sidebar_label: cssModules
3
+ ---
4
+
5
+ # output.cssModules
6
+
7
+ :::tip
8
+ This config is provided by Modern.js Builder, more detail can see [output.cssModules](https://modernjs.dev/builder/en/api/config-output.html#outputcssmodules).
9
+ :::
10
+
11
+ import Main from '@modern-js/builder-doc/docs/en/config/output/cssModules.md';
12
+
13
+ <Main />
@@ -4,9 +4,9 @@ sidebar_position: 2
4
4
 
5
5
  # Builder
6
6
 
7
- **Modern.js's build capability is provided by [Modern.js Builder](https://modernjs.dev/builder).**
7
+ **Modern.js uses [Modern.js Builder](https://modernjs.dev/builder/en) to build your Web App.**
8
8
 
9
- Modern.js Builder is one of the core components of the Modern.js system. It is a build engine for web development scenarios that can be used independently of Modern.js. Modern.js Builder supports multiple packaging tools such as webpack and Rspack, and by default uses the most mature webpack for packaging.
9
+ Modern.js Builder is one of the core components of the Modern.js system. It is a build engine for web development scenarios that can be used independently of Modern.js. Modern.js Builder supports multiple bundlers such as webpack and Rspack, and by default uses the most mature webpack for bundling.
10
10
 
11
11
  ## Build Architecture
12
12
 
@@ -14,21 +14,21 @@ From a building perspective, Modern.js is divided into three layers, from top to
14
14
 
15
15
  - Upper-level development framework: Modern.js.
16
16
  - Common build engine: Modern.js Builder.
17
- - Lower-level packaging tool: webpack and Rspack.
17
+ - Low-level bundler: webpack and Rspack.
18
18
 
19
19
  <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/builder-layers-1117.png" style={{ width: '100%', maxWidth: '540px' }} />
20
20
 
21
21
  ## Builder Documentation
22
22
 
23
- Since Modern.js Builder is a module that can be used independently, we have provided separate documentation for it, which can be found at [modernjs.dev/builder](https://modernjs.dev/builder).
23
+ Since Modern.js Builder is a module that can be used independently, we have provided separate documentation for it, which can be found at [modernjs.dev/builder](https://modernjs.dev/builder/en).
24
24
 
25
- In this documentation, you can learn about the detailed introduction of Modern.js Builder, and you can also find complete usage guides for various building capabilities. When you have building needs or problems, it is recommended that you read the Modern.js Builder documentation first to solve them.
25
+ In this documentation, you can learn about the detailed introduction of Modern.js Builder, and you can also find complete usage guides for various building capabilities. If you have any building needs or problems, it is recommended that you read the Modern.js Builder documentation first to solve them.
26
26
 
27
27
  ## Builder Configuration
28
28
 
29
29
  Modern.js's configuration inherits from Modern.js Builder, so you can use all the build configurations provided by Modern.js Builder in Modern.js.
30
30
 
31
- Taking the `html.title` configuration item of Modern.js Builder as an example, you can directly use this configuration item in the `modern.config.ts` file, and it will be automatically passed to Modern.js Builder.
31
+ Taking the `html.title` config option of Modern.js Builder as an example, you can directly use this option in the `modern.config.ts` file, and it will be automatically passed to Modern.js Builder.
32
32
 
33
33
  ```ts title="modern.config.js"
34
34
  export default defineConfig({
@@ -38,10 +38,10 @@ export default defineConfig({
38
38
  });
39
39
  ```
40
40
 
41
- For detailed information about build configuration, please refer to [「Modern.js Builder - Builder Configuration」](https://modernjs.dev/builder/guide/basic/builder-config.html).
41
+ For detailed information about build configuration, please refer to [「Modern.js Builder - Builder Config」](https://modernjs.dev/builder/en/guide/basic/builder-config.html).
42
42
 
43
43
  ## Builder Capabilities
44
44
 
45
45
  Modern.js Builder provides rich build capabilities, including JavaScript compilation, CSS compilation, static resource processing, code hot update, code compression, TS type checking, and dozens of other capabilities.
46
46
 
47
- We recommend that you read [「Modern.js Builder - Feature Navigation」](https://modernjs.dev/builder/guide/features.html) to learn about all the build capabilities provided by Modern.js Builder.
47
+ We recommend that you read [「Modern.js Builder - All Features」](https://modernjs.dev/builder/en/guide/features.html) to learn about all the features provided by Modern.js Builder.
@@ -29,3 +29,11 @@ Please refer to [Modern.js Builder - Exceptions FAQ](https://modernjs.dev/builde
29
29
  - 'compilation' argument error when webpack compiling?
30
30
  - Compile error `You may need additional loader`?
31
31
  - Find `exports is not defined` runtime error?
32
+
33
+ ## HMR FAQ
34
+
35
+ Please refer to [Modern.js Builder - HMR FAQ](https://modernjs.dev/builder/guide/faq/hmr.html), such as:
36
+
37
+ - HMR not working when external React?
38
+ - HMR not working when setting filename hash in development mode?
39
+ - HMR not working when updating React components?
@@ -0,0 +1,13 @@
1
+ ---
2
+ sidebar_label: cssModules
3
+ ---
4
+
5
+ # output.cssModules
6
+
7
+ :::tip
8
+ 该配置由 Modern.js Builder 提供,更多信息可参考 [output.cssModules](https://modernjs.dev/builder/api/config-output.html#outputcssmodules)。
9
+ :::
10
+
11
+ import Main from '@modern-js/builder-doc/docs/zh/config/output/cssModules.md';
12
+
13
+ <Main />
@@ -29,3 +29,11 @@ sidebar_position: 3
29
29
  - webpack 编译出现 'compilation' argument 报错?
30
30
  - 编译时报错 `You may need additional loader`?
31
31
  - 打开页面后报错,提示 `exports is not defined`?
32
+
33
+ ## 热更新问题
34
+
35
+ 请参考 [「Modern.js Builder - 热更新问题」](https://modernjs.dev/builder/guide/faq/hmr.html),比如:
36
+
37
+ - 打包时 external React 后,热更新不生效?
38
+ - 开发环境设置文件名的 hash 后,热更新不生效?
39
+ - React 组件的热更新无法生效?
package/package.json CHANGED
@@ -15,13 +15,13 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-1686121516109",
18
+ "version": "0.0.0-next-1686150559103",
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org/",
21
21
  "access": "public"
22
22
  },
23
23
  "peerDependencies": {
24
- "@modern-js/builder-doc": "0.0.0-next-1686121516109"
24
+ "@modern-js/builder-doc": "0.0.0-next-1686150559103"
25
25
  },
26
26
  "devDependencies": {
27
27
  "classnames": "^2",
@@ -33,9 +33,9 @@
33
33
  "fs-extra": "^10",
34
34
  "@types/node": "^16",
35
35
  "@types/fs-extra": "^9",
36
- "@modern-js/builder-doc": "0.0.0-next-1686121516109",
37
- "@modern-js/doc-tools": "0.0.0-next-1686121516109",
38
- "@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1686121516109"
36
+ "@modern-js/builder-doc": "0.0.0-next-1686150559103",
37
+ "@modern-js/doc-tools": "0.0.0-next-1686150559103",
38
+ "@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1686150559103"
39
39
  },
40
40
  "scripts": {
41
41
  "dev": "modern dev",