@modern-js/module-tools-docs 2.53.0 → 2.54.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @modern-js/module-tools-docs
2
2
 
3
+ ## 2.54.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 38537fc: optimize the doc content
8
+
3
9
  ## 2.53.0
4
10
 
5
11
  ### Patch Changes
@@ -878,7 +878,7 @@ For more information about JSX Transform, you can refer to the following links:
878
878
 
879
879
  - [React Blog - Introducing the New JSX Transform](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html).
880
880
  - [esbuild - JSX](https://esbuild.github.io/api/#jsx).
881
- :::
881
+ :::
882
882
 
883
883
  ## metafile
884
884
 
@@ -97,7 +97,7 @@ export const libs = {
97
97
 
98
98
  In this case `babel-plugin-import` may also cause `Comps` to become `undefined`. So you need to remove the corresponding `babel-plugin-import` as well.
99
99
 
100
- ### Cannot find module http
100
+ ### Cannot find module 'http'
101
101
 
102
102
  If the output reports an error like `Cannot find module 'http'` at browser runtime, it means that your output has bundled node modules.
103
103
  This may occur if some of your dependencies support both browser and node, such as `axios`, in which case you only need to set the [platform](/api/config/build-config.html#platform) to `browser`.
@@ -17,7 +17,7 @@ In addition to the Addon, other configurations may also have differences. For ex
17
17
  - v6:[Document](https://storybook.js.org/docs/6.5/react/writing-stories/decorators#global-decorators)
18
18
  - v7:[Document](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators)
19
19
 
20
- ## Cannot find module 'react-dom/package.json
20
+ ## Cannot find module 'react-dom/package.json'
21
21
 
22
22
  When debug Storybook, the following problem occurs:
23
23
 
@@ -39,15 +39,15 @@ export default defineConfig({
39
39
 
40
40
  `buildPreset` 代表着提前准备好的一组或者多组构建相关的配置,只需要使用 `buildPreset` 对应的预设值,就可以省去麻烦且复杂的配置工作,得到符合预期的产物。
41
41
 
42
- Modern.js Module 主要内置了两套构建预设,包括:
42
+ Modern.js Module 主要内置了两套构建预设,包括:
43
43
 
44
44
  - `npm-component`: 用于构建组件库。
45
- - `npm-library`: 用于打包其他库类型的项目,如工具库。
45
+ - `npm-library`: 用于打包其他库类型的项目,如工具库。
46
46
 
47
47
  同时,还提供一些变体,例如 `npm-library-with-umd` 和 `npm-library-es5`,顾名思义,分别对应带有 umd 产物和支持到 es5 语法的库预设。
48
- 详细配置可以查看其[API](/api/config/build-preset)。
48
+ 详细配置可以查看其 [API](/api/config/build-preset)
49
49
 
50
- 除此之外,我们也可以完全自定义构建配置:
50
+ 除此之外,我们也可以完全自定义构建配置:
51
51
 
52
52
  ## 构建配置
53
53
 
@@ -97,7 +97,7 @@ export const libs = {
97
97
 
98
98
  此时 `babel-plugin-import` 也可能会导致 `Comps` 变为 `undefined`。因此也需要移除对应的 `babel-plugin-import`。
99
99
 
100
- ### Cannot find module http
100
+ ### Cannot find module 'http'
101
101
 
102
102
  如果产物在浏览器运行时报了类似 `Cannot find module 'http'` 的错误,说明你的产物打包进了 node 模块。
103
103
  这可能会发生于你的依赖里有一些同时支持 browser 和 node 的三方包,例如 `axios`,此时只需要将 [platform](/api/config/build-config.html#platform) 设置为 `browser` 即可。
@@ -17,7 +17,7 @@ Modern.js Module 目前使用的 Storybook 版本是 v6,如果使用了 v7 版
17
17
  - v6:[文档链接](https://storybook.js.org/docs/6.5/react/writing-stories/decorators#global-decorators)
18
18
  - v7:[文档链接](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators)
19
19
 
20
- ## Cannot find module 'react-dom/package.json
20
+ ## Cannot find module 'react-dom/package.json'
21
21
 
22
22
  在执行 Storybook 调试的时候,出现下面的报错提示:
23
23
 
package/package.json CHANGED
@@ -9,14 +9,14 @@
9
9
  "directory": "packages/document/module-doc"
10
10
  },
11
11
  "license": "MIT",
12
- "version": "2.53.0",
12
+ "version": "2.54.0",
13
13
  "main": "index.js",
14
14
  "devDependencies": {
15
15
  "react": "^18.2.0",
16
16
  "react-dom": "^18.2.0",
17
17
  "rspress": "1.18.2",
18
18
  "@rspress/shared": "1.18.2",
19
- "@modern-js/doc-plugin-auto-sidebar": "2.53.0"
19
+ "@modern-js/doc-plugin-auto-sidebar": "2.54.0"
20
20
  },
21
21
  "scripts": {
22
22
  "dev": "rspress dev",