@modern-js/main-doc 0.0.0-nightly-20240831170640 → 0.0.0-nightly-20240902170725

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/package.json CHANGED
@@ -15,17 +15,17 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-nightly-20240831170640",
18
+ "version": "0.0.0-nightly-20240902170725",
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-20240831170640"
25
+ "@modern-js/sandpack-react": "0.0.0-nightly-20240902170725"
26
26
  },
27
27
  "peerDependencies": {
28
- "@modern-js/builder-doc": "0.0.0-nightly-20240831170640"
28
+ "@modern-js/builder-doc": "0.0.0-nightly-20240902170725"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@rspress/shared": "1.28.2",
@@ -39,7 +39,7 @@
39
39
  "rspress": "1.28.2",
40
40
  "ts-node": "^10.9.1",
41
41
  "typescript": "^5",
42
- "@modern-js/builder-doc": "0.0.0-nightly-20240831170640"
42
+ "@modern-js/builder-doc": "0.0.0-nightly-20240902170725"
43
43
  },
44
44
  "scripts": {
45
45
  "dev": "rspress dev",
@@ -1,37 +0,0 @@
1
- ---
2
- title: storybook/
3
- sidebar_position: 7
4
- ---
5
-
6
- # storybook/
7
-
8
- Modern.js supports debugging using Storybook. When configuring Storybook, you need to configure it in the `config/storybook` directory of the project.
9
-
10
- Please refer to [Storybook Configuration](https://storybook.js.org/docs/react/configure/overview) for Storybook configuration.
11
-
12
- :::info
13
- Enabling the Storybook function requires running the new command to enable it under the project first.
14
- :::
15
-
16
- #### Example
17
-
18
- For the webpack configuration of the Storybook Manager app section, you can configure it by adding the `./config/storybook/main.js` file to configure it.
19
-
20
- ```js
21
- // ./config/storybook/main.js
22
-
23
- module.exports = {
24
- // it controls the Storybook manager app
25
- managerWebpack: async (config, options) => {
26
- // update config here
27
- return config;
28
- },
29
- };
30
- ```
31
-
32
- ### Limitation
33
-
34
- There are some limitations when using the `config/storybook` directory for configuration:
35
-
36
- - The location where the Story file is stored cannot be modified, that is, the `stories` configuration cannot be modified in the `main.js` file.
37
- - It is not supported to modify Webpack and Babel related configurations in `main.js`, related requirements can be passed through [`tools.webpack`](/configure/app/tools/webpack.html) /[`tools.babel`](/configure/app/tools/babel.html) modify.
@@ -1,38 +0,0 @@
1
- ---
2
- title: storybook/
3
- sidebar_position: 7
4
- ---
5
-
6
- # storybook/
7
-
8
- Modern.js 支持使用 Storybook 进行调试,当需要对 Storybook 进行配置时,需要在项目 config/storybook 目录进行配置。
9
-
10
- Storybook 配置请查看:[Storybook 配置](https://storybook.js.org/docs/react/configure/overview)
11
-
12
- :::info
13
- 使用 Storybook 进行调试需要提前在项目下执行 new 命令启用「Storybook」模式功能。
14
-
15
- :::
16
-
17
- ### 示例
18
-
19
- 对于 Storybook Manager app 部分的 webpack 配置,可以通过增加 `./config/storybook/main.js` 文件进行配置。
20
-
21
- ```js
22
- // ./config/storybook/main.js
23
-
24
- module.exports = {
25
- // it controls the Storybook manager app
26
- managerWebpack: async (config, options) => {
27
- // update config here
28
- return config;
29
- },
30
- };
31
- ```
32
-
33
- ### 限制
34
-
35
- 在使用 config/storybook 目录进行配置时,存在以下限制:
36
-
37
- - 不能修改 Story 文件存放的位置,即无法在 `main.js` 文件里修改 `stories` 配置。
38
- - 不支持在 `main.js` 中修改 Webpack 和 Babel 相关配置,相关需求可通过 [`tools.webpack`](/configure/app/tools/webpack.html) / [`tools.babel`](/configure/app/tools/babel.html) 修改。