@modern-js/main-doc 0.0.0-nightly-20241008170649 → 0.0.0-nightly-20241010170724
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.
@@ -8,12 +8,19 @@ configName: dev.watchFiles
|
|
8
8
|
- **Type:**
|
9
9
|
|
10
10
|
```ts
|
11
|
-
type WatchFiles =
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
type WatchFiles =
|
12
|
+
| {
|
13
|
+
paths: string | string[];
|
14
|
+
type?: 'reload-page';
|
15
|
+
// watch options for chokidar
|
16
|
+
options?: WatchOptions;
|
17
|
+
}
|
18
|
+
| {
|
19
|
+
paths: string | string[];
|
20
|
+
type?: 'reload-server';
|
21
|
+
};
|
22
|
+
|
23
|
+
type WatchFilesConfig = WatchFiles | WatchFiles[];
|
17
24
|
```
|
18
25
|
|
19
26
|
- **Default:** `undefined`
|
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: copy
|
3
|
+
configName: output.copy
|
3
4
|
---
|
4
5
|
|
5
6
|
# output.copy
|
@@ -9,4 +10,6 @@ title: copy
|
|
9
10
|
|
10
11
|
Copies the specified file or directory to the dist directory, implemented based on [rspack.CopyRspackPlugin](https://rspack.dev/zh/plugins/rspack/copy-rspack-plugin).
|
11
12
|
|
12
|
-
|
13
|
+
import RsbuildConig from '@site-docs-en/components/rsbuild-config-tooltip';
|
14
|
+
|
15
|
+
<RsbuildConig />
|
@@ -8,12 +8,19 @@ configName: dev.watchFiles
|
|
8
8
|
- **类型:**
|
9
9
|
|
10
10
|
```ts
|
11
|
-
type WatchFiles =
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
type WatchFiles =
|
12
|
+
| {
|
13
|
+
paths: string | string[];
|
14
|
+
type?: 'reload-page';
|
15
|
+
// chokidar 选项
|
16
|
+
options?: WatchOptions;
|
17
|
+
}
|
18
|
+
| {
|
19
|
+
paths: string | string[];
|
20
|
+
type?: 'reload-server';
|
21
|
+
};
|
22
|
+
|
23
|
+
type WatchFilesConfig = WatchFiles | WatchFiles[];
|
17
24
|
```
|
18
25
|
|
19
26
|
- **默认值:** `undefined`
|
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: copy
|
3
|
+
configName: output.copy
|
3
4
|
---
|
4
5
|
|
5
6
|
# output.copy
|
@@ -7,7 +8,8 @@ title: copy
|
|
7
8
|
- **类型:** `Rspack.CopyRspackPluginOptions | Rspack.CopyRspackPluginOptions['patterns']`
|
8
9
|
- **默认值:** `undefined`
|
9
10
|
|
10
|
-
|
11
11
|
将指定的文件或目录拷贝到构建输出目录中,基于 [rspack.CopyRspackPlugin](https://rspack.dev/zh/plugins/rspack/copy-rspack-plugin) 实现。
|
12
12
|
|
13
|
-
|
13
|
+
import RsbuildConig from '@site-docs/components/rsbuild-config-tooltip';
|
14
|
+
|
15
|
+
<RsbuildConig />
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Modern.js 拥有自己的框架插件系统,你可以通过在 `modern.config.ts` 中配置 [`plugins`](/configure/app/plugins) 字段来使用 Modern.js 插件。
|
8
8
|
|
9
|
-
### 插件类型
|
9
|
+
### 插件类型
|
10
10
|
|
11
11
|
框架插件可以细分成三类,分别是:
|
12
12
|
|
@@ -62,8 +62,8 @@ Modern.js 从 `MAJOR_VERSION.46.0` 起开始将底层的构建工具升级为 [R
|
|
62
62
|
| [CSS Minimizer 插件](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) | 用于自定义 CSS 压缩工具,切换到 [cssnano](https://cssnano.co/) 或其他工具进行 CSS 压缩。 | [tools.minifyCss](/configure/app/tools/minify-css.html) |
|
63
63
|
| [Pug 插件](https://github.com/rspack-contrib/rsbuild-plugin-pug) | 提供对 Pug 模板引擎的支持 | [tools.pug](/configure/app/tools/pug.html) |
|
64
64
|
| [Rem 插件](https://github.com/rspack-contrib/rsbuild-plugin-rem) | 用于实现移动端页面的 rem 自适应布局 | [output.convertToRem](/configure/app/output/convert-to-rem.html) |
|
65
|
-
| [YAML 插件](https://github.com/rspack-contrib/rsbuild-plugin-yaml) | 用于引用 YAML 文件,并将其转换为 JavaScript 对象 | [
|
66
|
-
| [TOML 插件](https://github.com/rspack-contrib/rsbuild-plugin-toml) | 用于引用 TOML 文件,并将其转换为 JavaScript 对象 | [
|
65
|
+
| [YAML 插件](https://github.com/rspack-contrib/rsbuild-plugin-yaml) | 用于引用 YAML 文件,并将其转换为 JavaScript 对象 | [YAML 文件](/guides/basic-features/static-assets/json-files.html#yaml-文件) |
|
66
|
+
| [TOML 插件](https://github.com/rspack-contrib/rsbuild-plugin-toml) | 用于引用 TOML 文件,并将其转换为 JavaScript 对象 | [TOML 文件](/guides/basic-features/static-assets/json-files.html#toml-文件) |
|
67
67
|
|
68
68
|
#### 未内置的插件
|
69
69
|
|
@@ -75,4 +75,4 @@ Modern.js 从 `MAJOR_VERSION.46.0` 起开始将底层的构建工具升级为 [R
|
|
75
75
|
|
76
76
|
import OtherPlugins from '@site-docs/components/other-plugins.mdx';
|
77
77
|
|
78
|
-
<OtherPlugins />
|
78
|
+
<OtherPlugins />
|
package/package.json
CHANGED
@@ -15,14 +15,14 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "0.0.0-nightly-
|
18
|
+
"version": "0.0.0-nightly-20241010170724",
|
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-
|
25
|
+
"@modern-js/sandpack-react": "0.0.0-nightly-20241010170724"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"@rspress/shared": "1.31.1",
|