@modern-js/main-doc 0.0.0-next-1680569268159 → 0.0.0-next-1680618894252

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-1680569268159
3
+ ## 0.0.0-next-1680618894252
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  feat: 预打包主题
12
12
 
13
- - @modern-js/builder-doc@0.0.0-next-1680569268159
13
+ - @modern-js/builder-doc@0.0.0-next-1680618894252
14
14
 
15
15
  ## 2.11.0
16
16
 
@@ -1,16 +1,56 @@
1
1
  ---
2
- title: icon.png
2
+ title: icon
3
3
  sidebar_position: 2
4
4
  ---
5
- # icon.png
6
5
 
7
- When `config/icon.png` exist, it can inject app icon information into the html page at build time:
6
+ # Icon
8
7
 
8
+ ## Set favicon
9
+
10
+ When there is a `favicon.*` file in the `config` directory of the project root directory, Modern.js will automatically set the file to the [html.favicon](/configure/app/html/favicon) config to generate the favicon icon for the page:
11
+
12
+ ```
13
+ ./config
14
+ └── favicon.ico
9
15
  ```
10
- .config
16
+
17
+ After the build is complete, you can see that the following tags are automatically generated in the HTML:
18
+
19
+ ```html
20
+ <link rel="icon" href="/favicon.ico" />
21
+ ```
22
+
23
+ ### Order
24
+
25
+ When setting up the favicon, Modern.js looks for files in the following order:
26
+
27
+ - favicon.png
28
+ - favicon.jpg
29
+ - favicon.jpeg
30
+ - favicon.svg
31
+ - favicon.ico
32
+
33
+ ## Set app icon
34
+
35
+ When there is an `icon.*` file in the `config` directory of the project root directory, Modern.js will automatically set the file to the [html.appIcon](/configure/app/html/app-icon) config, it is used to generate the apple-touch-icon icon for the iOS system.
36
+
37
+ ```
38
+ ./config
11
39
  └── icon.png
12
40
  ```
13
41
 
14
- the app icon `link` meta will be injected into the html, as follows:
42
+ After the build is complete, you can see that the following tags are automatically generated in the HTML:
43
+
44
+ ```html
45
+ <link rel="apple-touch-icon" sizes="180*180" href="/static/image/icon.png" />
46
+ ```
47
+
48
+ ### Order
49
+
50
+ When setting the app icon, Modern.js looks for files in the following order:
15
51
 
16
- ![app-icon](https://lf3-static.bytednsdoc.com/obj/eden-cn/aphqeh7uhohpquloj/modern-js/api/app-icon.png)
52
+ - icon.png
53
+ - icon.jpg
54
+ - icon.jpeg
55
+ - icon.svg
56
+ - icon.ico
@@ -0,0 +1,31 @@
1
+ ---
2
+ sidebar_position: 3
3
+ ---
4
+
5
+ # Build FAQ
6
+
7
+ If you encounter build-related problems, you can refer to the following documents:
8
+
9
+ ## General FAQ
10
+
11
+ Please refer to [Modern.js Builder - General FAQ](https://modernjs.dev/builder/en/guide/faq/general.html), which contains some general questions about concepts, such as:
12
+
13
+ - The relationship between Modern.js Builder and Modern.js?
14
+ - Can Builder be used to build libraries or UI components?
15
+ - Will Builder support Vite?
16
+
17
+ ## Features FAQ
18
+
19
+ Please refer to [Modern.js Builder - Features FAQ](https://modernjs.dev/builder/en/guide/faq/features.html), which contains an introduction to some common building features, such as:
20
+
21
+ - How to import UI Component library on demand?
22
+ - How to run ESLint during compilation?
23
+ - How to configure CDN path for static assets?
24
+
25
+ ## Exceptions FAQ
26
+
27
+ Please refer to [Modern.js Builder - Exceptions FAQ](https://modernjs.dev/builder/en/guide/faq/exceptions.html), which contains some common construction problems, such as:
28
+
29
+ - 'compilation' argument error when webpack compiling?
30
+ - Compile error `You may need additional loader`?
31
+ - Find `exports is not defined` runtime error?
@@ -1,18 +1,56 @@
1
1
  ---
2
- title: icon.png
2
+ title: icon
3
3
  sidebar_position: 2
4
4
  ---
5
- # icon.png
6
5
 
7
- 应用工程方案 App Icon 文件。
6
+ # Icon
8
7
 
9
- 项目根目录下 `config/icon.png` 时,可以在构建时向 html 页面注入 app icon 信息:
8
+ ## 设置 favicon
9
+
10
+ 当项目根目录的 `config` 目录下存在 `favicon.*` 文件时,Modern.js 会自动将该文件设置到 [html.favicon](/configure/app/html/favicon) 配置项中,用于生成页面的 favicon 图标:
11
+
12
+ ```
13
+ ./config
14
+ └── favicon.ico
15
+ ```
16
+
17
+ 构建完成后,可以看到 HTML 中自动生成了以下标签:
18
+
19
+ ```html
20
+ <link rel="icon" href="/favicon.ico" />
21
+ ```
22
+
23
+ ### 查找顺序
24
+
25
+ 在设置 app icon 时,Modern.js 会按以下顺序寻找文件:
26
+
27
+ - favicon.png
28
+ - favicon.jpg
29
+ - favicon.jpeg
30
+ - favicon.svg
31
+ - favicon.ico
32
+
33
+ ## 设置 app icon
34
+
35
+ 当项目根目录的 `config` 目录下存在 `icon.*` 文件时,Modern.js 会自动将该文件设置到 [html.appIcon](/configure/app/html/app-icon) 配置项中,用于生成 iOS 系统下的 apple-touch-icon 图标。
10
36
 
11
37
  ```
12
38
  ./config
13
39
  └── icon.png
14
40
  ```
15
41
 
16
- 最终 html 中会注入 app icon `link` 标签, 如下:
42
+ 构建完成后,可以看到 HTML 中自动生成了以下标签:
43
+
44
+ ```html
45
+ <link rel="apple-touch-icon" sizes="180*180" href="/static/image/icon.png" />
46
+ ```
47
+
48
+ ### 查找顺序
49
+
50
+ 在设置 app icon 时,Modern.js 会按以下顺序寻找文件:
17
51
 
18
- ![app-icon](https://lf3-static.bytednsdoc.com/obj/eden-cn/aphqeh7uhohpquloj/modern-js/api/app-icon.png)
52
+ - icon.png
53
+ - icon.jpg
54
+ - icon.jpeg
55
+ - icon.svg
56
+ - icon.ico
@@ -0,0 +1,31 @@
1
+ ---
2
+ sidebar_position: 3
3
+ ---
4
+
5
+ # 构建相关问题
6
+
7
+ 如果你遇到了构建相关的问题,可以参考以下文档:
8
+
9
+ ## 通用类问题
10
+
11
+ 请参考 [「Modern.js Builder - 通用类问题」](https://modernjs.dev/builder/guide/faq/general.html),其中包含一些概念类的通用问题,比如:
12
+
13
+ - Modern.js Builder 和 Modern.js 的关系?
14
+ - Builder 能否用于构建工具库或组件库?
15
+ - Builder 是否会接入 Vite?
16
+
17
+ ## 功能类问题
18
+
19
+ 请参考 [「Modern.js Builder - 功能类问题」](https://modernjs.dev/builder/guide/faq/features.html),其中包含一些常见构建功能的介绍,比如:
20
+
21
+ - 如何配置组件库按需引入?
22
+ - 如何在编译过程中进行 ESLint 代码校验?
23
+ - 如何配置静态资源的 CDN 路径?
24
+
25
+ ## 异常类问题
26
+
27
+ 请参考 [「Modern.js Builder - 异常类问题」](https://modernjs.dev/builder/guide/faq/exceptions.html),其中包含一些常见构建问题的处理方法,比如:
28
+
29
+ - webpack 编译出现 'compilation' argument 报错?
30
+ - 编译时报错 `You may need additional loader`?
31
+ - 打开页面后报错,提示 `exports is not defined`?
package/package.json CHANGED
@@ -11,13 +11,13 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-1680569268159",
14
+ "version": "0.0.0-next-1680618894252",
15
15
  "publishConfig": {
16
16
  "registry": "https://registry.npmjs.org/",
17
17
  "access": "public"
18
18
  },
19
19
  "peerDependencies": {
20
- "@modern-js/builder-doc": "0.0.0-next-1680569268159"
20
+ "@modern-js/builder-doc": "0.0.0-next-1680618894252"
21
21
  },
22
22
  "devDependencies": {
23
23
  "classnames": "^2",
@@ -29,9 +29,9 @@
29
29
  "fs-extra": "^10",
30
30
  "@types/node": "^16",
31
31
  "@types/fs-extra": "^9",
32
- "@modern-js/builder-doc": "0.0.0-next-1680569268159",
33
- "@modern-js/doc-tools": "0.0.0-next-1680569268159",
34
- "@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1680569268159"
32
+ "@modern-js/builder-doc": "0.0.0-next-1680618894252",
33
+ "@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1680618894252",
34
+ "@modern-js/doc-tools": "0.0.0-next-1680618894252"
35
35
  },
36
36
  "scripts": {
37
37
  "dev": "modern dev",