Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add docs for incremental #8293

Merged
merged 4 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions website/docs/en/config/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,53 @@ module.exports = {
};
```

## experiments.incremental

<ApiMeta addedVersion="1.1.0-beta.0" />

- **Type:** `undefined | boolean | Incremental`
- **Default:** `undefined`

```ts
type Incremental = {
make?: boolean;
emitAssets?: boolean;
inferAsyncModules?: boolean;
providedExports?: boolean;
dependenciesDiagnostics?: boolean;
modulesHashes?: boolean;
modulesCodegen?: boolean;
modulesRuntimeRequirements?: boolean;
buildChunkGraph?: boolean;
};
```

Whether to enable incremental rebuild to speed up the rebuild speed.

`true` means enable incremental for all stages. `false` means disable incremental for all stages. Incremental can also be enabled only for specified partial stages:

```ts
module.exports = {
experiments: {
// enable incremental for all stages
incremental: true,
chenjiahan marked this conversation as resolved.
Show resolved Hide resolved
// disable incremental for all stages
incremental: false,
// enable only for specified partial stages
incremental: {
make: true,
emitAssets: true,
},
},
};
```

Currently, incremental for the `make` and `emitAssets` stages is enabled by default. This is also the default behavior since Rspack v1.0. As this feature further stabilizes, we will enable incremental for more stages by default.

:::tip
This feature is experimental. You can check its relevant progress at [rspack#8106](https://github.com/web-infra-dev/rspack/issues/8106). You can also report bugs and any related feedback here.
:::

## experiments.rspackFuture

- **Type:** `object`
Expand Down
47 changes: 47 additions & 0 deletions website/docs/zh/config/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,53 @@ module.exports = {
};
```

## experiments.incremental

<ApiMeta addedVersion="1.1.0-beta.0" />

- **类型:** `undefined | boolean | Incremental`
- **默认值:** `undefined`

```ts
type Incremental = {
make?: boolean;
emitAssets?: boolean;
inferAsyncModules?: boolean;
providedExports?: boolean;
dependenciesDiagnostics?: boolean;
modulesHashes?: boolean;
modulesCodegen?: boolean;
modulesRuntimeRequirements?: boolean;
buildChunkGraph?: boolean;
};
```

是否增量地进行重构建,加快重构建的速度。

`true` 表示对全部阶段启用增量,`false` 表示对全部阶段关闭增量,也可以仅对指定的部分阶段开启增量:

```ts
module.exports = {
experiments: {
// 对全部阶段启用增量
incremental: true,
// 对全部阶段关闭增量
incremental: false,
// 仅对指定的部分阶段开启增量
incremental: {
make: true,
emitAssets: true,
},
},
};
```

目前 Rspack 默认开启 `make` 和 `emitAssets` 阶段的增量,这也是之前 Rspack v1.0 的默认行为。随着该特性的进一步稳定,我们会默认开启更多阶段的增量,直到完全启用。

:::tip
该特性属于实验性特性,可前往 [rspack#8106](https://github.com/web-infra-dev/rspack/issues/8106) 查看其相关进度,也可在此 issue 中反馈 bugs 以及任何与之相关的反馈信息。
:::

## experiments.rspackFuture

- **类型:** `object`
Expand Down
Loading