diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 80145794eb..df814a23d1 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,6 +1,6 @@ -# Contributor Covenant Code of Conduct +# Contributor covenant code of conduct -## Our Pledge +## Our pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body @@ -12,7 +12,7 @@ and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. -## Our Standards +## Our standards Examples of behavior that contributes to a positive environment for our community include: @@ -36,7 +36,7 @@ Examples of unacceptable behavior include: - Other conduct which could reasonably be considered inappropriate in a professional setting -## Enforcement Responsibilities +## Enforcement responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in @@ -65,7 +65,7 @@ All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. -## Enforcement Guidelines +## Enforcement guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: @@ -91,7 +91,7 @@ includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. -### 3. Temporary Ban +### 3. Temporary ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. @@ -102,7 +102,7 @@ private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. -### 4. Permanent Ban +### 4. Permanent ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69a051d92f..26eb2e020d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,12 +1,12 @@ -# Rsbuild Contribution Guide +# Rsbuild contribution guide Thank you for your interest in contributing to Rsbuild! Before you start your contribution, please take a moment to read the following guidelines. --- -## Setup the Environment +## Setup the environment -### Fork the Repo +### Fork the repo [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local. @@ -39,7 +39,7 @@ nvm alias default 20 nvm use 20 ``` -### Install Dependencies +### Install dependencies Enable [pnpm](https://pnpm.io/) with corepack: @@ -59,7 +59,7 @@ What this will do: - Create symlinks between packages in the monorepo - Run the `prepare` script to build all packages, powered by [nx](https://nx.dev/). -### Set Git Email +### Set git email Please make sure you have your email set up in ``. This will be needed later when you want to submit a pull request. @@ -83,11 +83,11 @@ git config user.email "SOME_EMAIL@example.com" --- -## Making Changes and Building +## Making changes and building Once you have set up the local development environment in your forked repo, we can start development. -### Checkout A New Branch +### Checkout a new branch It is recommended to develop on a new branch, as it will make things easier later when you submit a pull request: @@ -95,7 +95,7 @@ It is recommended to develop on a new branch, as it will make things easier late git checkout -b MY_BRANCH_NAME ``` -### Build the Package +### Build the package Use [nx build](https://nx.dev/nx-api/nx/documents/run) to build the package you want to change: @@ -113,13 +113,13 @@ pnpm run build ## Testing -### Add New Tests +### Add new tests If you've fixed a bug or added code that should be tested, then add some tests. You can add unit test cases in the `/tests` folder. The test runner is based on [Vitest](https://vitest.dev/). -### Run Unit Tests +### Run unit tests Before submitting a pull request, it's important to make sure that the changes haven't introduced any regressions or bugs. You can run the unit tests for the project by executing the following command: @@ -133,7 +133,7 @@ You can also run the unit tests of single package: pnpm run ut packages/core ``` -### Run E2E Tests +### Run E2E tests Rsbuild uses [playwright](https://github.com/microsoft/playwright) to run end-to-end tests. @@ -174,9 +174,9 @@ You can find the Rsbuild documentation in the [website](./website) folder. --- -## Submitting Changes +## Submitting changes -### Committing your Changes +### Committing your changes Commit your changes to your forked repo, and [create a pull request](https://help.github.com/articles/creating-a-pull-request/). diff --git a/README.md b/README.md index ece94e0057..0120a66cee 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ The following diagram illustrates the relationship between Rsbuild and other too ![Rspack stack layers](https://assets.rspack.dev/rsbuild/assets/rspack-stack-layers.png) -## 📚 Getting Started +## 📚 Getting started To get started with Rsbuild, see the [Quick Start](https://rsbuild.dev/guide/start/quick-start). @@ -138,7 +138,7 @@ Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/bl -### Code of Conduct +### Code of conduct This repo has adopted the ByteDance Open Source Code of Conduct. Please check [Code of Conduct](./CODE_OF_CONDUCT.md) for more details. diff --git a/README.pt-BR.md b/README.pt-BR.md index b692cfd9d8..82fc2c1c48 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -138,7 +138,7 @@ Por favor leia o [Guia de Contribuição](https://github.com/web-infra-dev/rsbui -### Código de Conduta +### Código de conduta Este repositório adotou o código de conduta de código aberto da ByteDance. Por favor, verifique [Código de Conduta](./CODE_OF_CONDUCT.md) para mais detalhes. diff --git a/e2e/README.md b/e2e/README.md index b77c87a97e..e4dab66916 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -2,7 +2,7 @@ This folder contains the e2e test cases of Rsbuild. -## Tech Stack +## Tech stack - [playwright](https://github.com/microsoft/playwright): The e2e test framework. @@ -11,13 +11,13 @@ This folder contains the e2e test cases of Rsbuild. Most of the E2E tests in Rsbuild are run by both Rspack and Webpack at the same time. This is to check that the functionality of Rspack is correctly aligned with Webpack. ```bash -# Run all test cases, including Rspack and Webpack +# Run all test cases, including Rspack and webpack pnpm test # Run test cases for Rspack pnpm test:rspack -# Run test cases for Webpack +# Run test cases for webpack pnpm test:webpack # Run specific test case, such as "css" @@ -25,7 +25,7 @@ pnpm test:webpack css pnpm test:rspack css ``` -## Add Test Cases +## Add test cases Test cases added using the `test` method will run in both Rspack and Webpack. diff --git a/examples/README.md b/examples/README.md index ba50851280..675bbce8c7 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,11 +1,11 @@ -# Rsbuild Examples +# Rsbuild examples This folder contains some basic examples for Rsbuild, you can use these examples for debugging. -## More Cases +## More cases More use cases can be found in [e2e/cases](../e2e/cases/). -## Add Examples +## Add examples It is recommended to add more examples to [rspack-examples](https://github.com/rspack-contrib/rspack-examples). diff --git a/packages/compat/README.md b/packages/compat/README.md index 6b194095e1..fe9b7fab48 100644 --- a/packages/compat/README.md +++ b/packages/compat/README.md @@ -1,4 +1,4 @@ -# Compat Packages +# Compat packages The compat folder contains some packages that are used to test the compatibility of Rspack with webpack. diff --git a/packages/create-rsbuild/template-common/README.md b/packages/create-rsbuild/template-common/README.md index 37b1dd3328..5fc0306f5b 100644 --- a/packages/create-rsbuild/template-common/README.md +++ b/packages/create-rsbuild/template-common/README.md @@ -1,4 +1,4 @@ -# Rsbuild Project +# Rsbuild project ## Setup @@ -8,7 +8,7 @@ Install the dependencies: pnpm install ``` -## Get Started +## Get started Start the dev server: diff --git a/website/README.md b/website/README.md index db55263eac..b46aa210a5 100644 --- a/website/README.md +++ b/website/README.md @@ -1,4 +1,4 @@ -# Rsbuild Website +# Rsbuild website This website is built with [Rspress](https://github.com/web-infra-dev/rspress), the document content can be written using markdown or mdx syntax. You can refer to the [Rspress Website](https://rspress.dev/) for detailed usage. @@ -6,7 +6,11 @@ This website is built with [Rspress](https://github.com/web-infra-dev/rspress), Currently Rsbuild provides documentation in English and Chinese. If you can use Chinese, please update both documents at the same time. Otherwise, just update the English documentation. -### Image Assets +## Writing style guide + +The same as Rspack: [Writing style guide](https://github.com/web-infra-dev/rspack/tree/main/website#writing-style-guide). + +### Image assets For images you use in the document, it's better to upload them to the [rspack-contrib/rstack-design-resources](https://github.com/rspack-contrib/rstack-design-resources) repository, so the size of the current repository doesn't get too big. diff --git a/website/docs/en/api/javascript-api/core.mdx b/website/docs/en/api/javascript-api/core.mdx index 221a7dd434..720c0b848b 100644 --- a/website/docs/en/api/javascript-api/core.mdx +++ b/website/docs/en/api/javascript-api/core.mdx @@ -1,4 +1,4 @@ -# Rsbuild Core +# Rsbuild core This section describes some of the core methods provided by Rsbuild. @@ -212,7 +212,7 @@ The `mergeRsbuildConfig` function takes multiple configuration objects as parame function mergeRsbuildConfig(...configs: RsbuildConfig[]): RsbuildConfig; ``` -### Basic Example +### Basic example ```ts import { mergeRsbuildConfig } from '@rsbuild/core'; @@ -235,7 +235,7 @@ console.log(mergedConfig); // { dev: { https: true } } > This method will not modify the config object in the input parameter. -### Merge Rules +### Merge rules In addition to deep merging, the `mergeRsbuildConfig` function also handles some options in a special way. @@ -337,7 +337,7 @@ logger.debug('This is a debug message'); logger.log('This is a log message'); ``` -### Custom Logger +### Custom logger You can use the `logger.override` method to override partial or all methods of the default logger: diff --git a/website/docs/en/api/javascript-api/environment-api.mdx b/website/docs/en/api/javascript-api/environment-api.mdx index 4757378438..a4c11c251a 100644 --- a/website/docs/en/api/javascript-api/environment-api.mdx +++ b/website/docs/en/api/javascript-api/environment-api.mdx @@ -4,7 +4,7 @@ Here you can find all the environment related APIs. > See [Multi-Environment Builds](/guide/advanced/environments) for more details. -## Environment Context +## Environment context Environment context is a read-only object that provides some context information about the current environment. diff --git a/website/docs/en/api/javascript-api/instance.mdx b/website/docs/en/api/javascript-api/instance.mdx index f38b2acc62..51c3bc0f0e 100644 --- a/website/docs/en/api/javascript-api/instance.mdx +++ b/website/docs/en/api/javascript-api/instance.mdx @@ -1,4 +1,4 @@ -# Rsbuild Instance +# Rsbuild instance This section describes all the properties and methods on the Rsbuild instance object. @@ -152,7 +152,7 @@ const result = await rsbuild.build({ await result.close(); ``` -### Stats Object +### Stats object In non-watch mode, the `rsbuild.build() returns an Rspack [stats](https://rspack.dev/api/javascript-api/stats) object: @@ -162,7 +162,7 @@ const result = await rsbuild.build(); console.log(result.stats); ``` -### Custom Compiler +### Custom compiler In some cases, you may want to use a custom compiler: @@ -249,7 +249,7 @@ console.log(port); // 3000 await server.close(); ``` -### Custom Compiler +### Custom compiler In some cases, you may want to use a custom compiler: @@ -264,7 +264,7 @@ await rsbuild.startDevServer({ }); ``` -### Get Port Silently +### Get port silently In some cases, the default startup port number is already occupied. In this situation, Rsbuild will automatically increment the port number until it finds an available one. This process will output a prompt log. If you do not want this log, you can set `getPortSilently` to `true`. @@ -677,7 +677,7 @@ await rsbuild.inspectConfig({ }); ``` -### Output Path +### Output path You can set the output path using `outputPath`. The default value is [output.distPath.root](/config/output/dist-path). diff --git a/website/docs/en/api/javascript-api/types.mdx b/website/docs/en/api/javascript-api/types.mdx index 176ab62f65..b305d4bbdf 100644 --- a/website/docs/en/api/javascript-api/types.mdx +++ b/website/docs/en/api/javascript-api/types.mdx @@ -1,4 +1,4 @@ -# Rsbuild Types +# Rsbuild types This section describes some of the type definitions provided by the Rsbuild. diff --git a/website/docs/en/api/start/index.mdx b/website/docs/en/api/start/index.mdx index 77c7f75618..971527e59f 100644 --- a/website/docs/en/api/start/index.mdx +++ b/website/docs/en/api/start/index.mdx @@ -4,7 +4,7 @@ Rsbuild provides a complete set of JavaScript APIs for developers to build highe Rsbuild's JavaScript API can be used in Node.js, Deno, or Bun. -## Access Example +## Access example Here is a basic example of how to access the Rsbuild JavaScript API. @@ -16,7 +16,7 @@ import { PackageManagerTabs } from '@theme'; -### 2. Create an Rsbuild Instance +### 2. Create an Rsbuild instance You can call the [createRsbuild](/api/javascript-api/core#creatersbuild) method to create an Rsbuild instance: @@ -28,7 +28,7 @@ const rsbuild = await createRsbuild(); The `createRsbuild` method provides some options, which you can learn more about in the [API - createRsbuild](/api/javascript-api/core#creatersbuild). -### 3. Call Rsbuild Instance Method +### 3. Call Rsbuild instance method The Rsbuild instance provides some methods, which you can use it according to the usage scenarios. @@ -55,7 +55,7 @@ await rsbuild.build(); After completing the above three steps, you have learned the basic usage of Rsbuild. Next, you can customize the build process through the Rsbuild plugin and Rsbuild configs. -## Exports Format +## Exports format Rsbuild provides exports in both ES Modules and CommonJS formats: diff --git a/website/docs/en/community/releases/index.mdx b/website/docs/en/community/releases/index.mdx index 738e36900e..1639bcade6 100644 --- a/website/docs/en/community/releases/index.mdx +++ b/website/docs/en/community/releases/index.mdx @@ -4,7 +4,7 @@ Please visit [GitHub - release](https://github.com/web-infra-dev/rsbuild/releases) to view the changes for each version of Rsbuild. -## Semantic Version +## Semantic version Rsbuild follows the [Semantic Versioning](https://semver.org/) specification. diff --git a/website/docs/en/community/releases/v0-1.mdx b/website/docs/en/community/releases/v0-1.mdx index e6ef646c89..863d9545bd 100644 --- a/website/docs/en/community/releases/v0-1.mdx +++ b/website/docs/en/community/releases/v0-1.mdx @@ -38,7 +38,7 @@ Rsbuild has the following features: - **Framework Agnostic**: Rsbuild is not coupled with any front-end UI framework. It supports frameworks like React, Vue, Svelte, Solid and Preact through plugins, and plans to support more UI frameworks from the community in the future. -### 💡 Next Step +### 💡 Next step Currently, Rsbuild is still evolving rapidly and plans to introduce many more powerful new features. diff --git a/website/docs/en/community/releases/v0-2.mdx b/website/docs/en/community/releases/v0-2.mdx index fc6f292369..afc17824dd 100644 --- a/website/docs/en/community/releases/v0-2.mdx +++ b/website/docs/en/community/releases/v0-2.mdx @@ -63,7 +63,7 @@ export default { }; ``` -## Write to Disk +## Write to disk `dev.writeToDisk` defaults to `false`. @@ -83,7 +83,7 @@ export default { }; ``` -## Babel Plugin +## Babel plugin `@rsbuild/plugin-babel` will move all babel-loader options to `babelLoaderOptions`: @@ -109,7 +109,7 @@ pluginBabel([ This change allows us to add more options for `pluginBabel`, such as `include` and `exclude`. -## Source Map +## Source map `output.disableSourceMap` has been renamed to `output.sourceMap`. @@ -144,7 +144,7 @@ The default value of source map has also been updated to improve build performan - before: generate JS / CSS source map in development, generate JS source map in production. - after: generate JS source map in development, no source map are generated in production. -## Inject Styles +## Inject styles Rename `output.disableCssExtract` to `output.injectStyles` to be clearer: diff --git a/website/docs/en/community/releases/v0-3.mdx b/website/docs/en/community/releases/v0-3.mdx index 7f64a0d8e0..911d7669ec 100644 --- a/website/docs/en/community/releases/v0-3.mdx +++ b/website/docs/en/community/releases/v0-3.mdx @@ -19,7 +19,7 @@ Notable changes: - [Module Federation added to Rspack](https://rspack.dev/blog/module-federation-added-to-rspack) - [Remove deprecated builtins options](https://rspack.dev/blog/announcing-0-5#make-swchelpers-and-react-refresh-as-peerdependencies) -## TOML / YAML Plugin +## TOML / YAML plugin The need to import TOML and YAML in JS is not common, so Rsbuild core will no longer support import TOML and YAML by default in v0.3.0. @@ -54,7 +54,7 @@ Some JavaScript APIs have changed: - The `printURLs` option of `rsbuild.startDevServer` is deprecated, use [server.printUrls](/config/server/print-urls) instead. - The `logger` option of `rsbuild.startDevServer` is deprecated, use [logger.override()](/api/javascript-api/core#logger) instead. -## Node Target +## Node target - Adjust default browserslist for node target, from `node >= 14` to `node >= 16`. - The default value of `output.distPath.server` is changed from `'bundles'` to `'server'` diff --git a/website/docs/en/community/releases/v0-4.mdx b/website/docs/en/community/releases/v0-4.mdx index 334be73f24..50cfa27482 100644 --- a/website/docs/en/community/releases/v0-4.mdx +++ b/website/docs/en/community/releases/v0-4.mdx @@ -10,7 +10,7 @@ published_at: 2024-02-06 08:00:00 Rsbuild 0.4 provides built-in support for module federation. It also contains some incompatible API updates. Please refer to the current document for upgrading. -### Module Federation Config +### Module Federation config Rsbuild now provides a builtin [moduleFederation](/config/module-federation/options) option, which will make configuring Module Federation in Rsbuild much easier. @@ -30,7 +30,7 @@ When you use this option, Rsbuild will automatically set the default `publicPath > See [RFC - Provide first-class support for Module Federation](https://github.com/web-infra-dev/rsbuild/discussions/1461) for details. -### Plugin Hook Order +### Plugin hook order In Rsbuild plugin, you can now declare the order of hooks using the `order` field: @@ -93,7 +93,7 @@ module.exports = { }; ``` -## Pure React Plugin +## Pure React plugin The React plugin has removed default [source.transformImport](/config/source/transform-import) config for [antd](https://www.npmjs.com/package/antd) v4 and [@arco-design/web-react](https://www.npmjs.com/package/@arco-design/web-react). diff --git a/website/docs/en/community/releases/v0-5.mdx b/website/docs/en/community/releases/v0-5.mdx index 7687979602..5664c8f525 100644 --- a/website/docs/en/community/releases/v0-5.mdx +++ b/website/docs/en/community/releases/v0-5.mdx @@ -38,7 +38,7 @@ In a real large-scale web application, we have integrated the Rsbuild Lightning - CSS compilation time was reduced from 8.4s to 0.12s, a 70x improvement. - The overall build time was reduced from 33.1s to 25.4s, a 30% increase. -## 🌟 Support for Custom Server +## 🌟 Support for custom server Rsbuild now supports replacing the dev server with a custom server that reuses Rsbuild's page preview, routing, and module hot update features. This makes it easier to integrate Rsbuild with other Node.js frameworks. @@ -60,7 +60,7 @@ async function startCustomServer() { For more details, please refer to [Rsbuild - createDevServer](/api/javascript-api/instance#rsbuildcreatedevserver). -## 🍭 Refactoring SVGR Plugin +## 🍭 Refactoring SVGR plugin In versions prior to 0.5.0, the default usage of the SVGR plugin was the same as create-react-app, allowing SVGs to be used via mixed import: @@ -94,7 +94,7 @@ pluginSvgr({ }); ``` -## 📍 Custom Minify Options +## 📍 Custom minify options The `output.disableMinimize` option has been renamed to [output.minify](/config/output/minify), and it allows customizing JS and HTML minification options. diff --git a/website/docs/en/community/releases/v0-7.mdx b/website/docs/en/community/releases/v0-7.mdx index b72f2ae45a..8a55057fd6 100644 --- a/website/docs/en/community/releases/v0-7.mdx +++ b/website/docs/en/community/releases/v0-7.mdx @@ -48,7 +48,7 @@ export default config; > For more usage, please refer to [storybook-rsbuild repository](https://github.com/rspack-contrib/storybook-rsbuild). -## Faster Sass Compilation +## Faster Sass compilation In Rsbuild 0.7, **Sass compilation is 3~10 times faster**. The performance improvements are particularly noticeable on large projects. @@ -60,7 +60,7 @@ This improvement is due to Rsbuild's default use of [sass-embedded](https://www. Rsbuild has also enabled the latest sass-loader's [modern-compiler](https://github.com/webpack-contrib/sass-loader/releases/tag/v14.2.0) API. This can enable Sass's shared resources feature, which allows the same compiler process to be reused when compiling multiple files, improving build performance. -## Better CSS Supports +## Better CSS supports Rsbuild now uses [CssExtractRspackPlugin](https://www.rspack.dev/plugins/rspack/css-extract-rspack-plugin) to extract CSS into separate files, rather than using the [experimental.css](https://www.rspack.dev/config/experiments#experimentscss) config to do so. @@ -151,7 +151,7 @@ const { createRsbuild } = require('@rsbuild/core'); ESM/CJS interop is a tricky issue, so we will provide both formats for a long time to make it easier for more users to use. -## Breaking Changes +## Breaking changes ### Upgrade Rspack to 0.7 @@ -161,7 +161,7 @@ In the new version, Rspack supports lazy compilation, which can significantly im In Rsbuild, you can use [dev.lazyCompilation](/config/dev/lazy-compilation) to enable lazy compilation. -### Sass and Less Plugins +### Sass and Less plugins Rsbuild's Sass and Less plugins are now two separate npm packages instead of being built into `@rsbuild/core` as before. This change allows users to enable Sass and Less compilation as needed. @@ -187,7 +187,7 @@ export default { }; ``` -### dataUriLimit Defaults +### dataUriLimit defaults The default value for [output.dataUriLimit](/config/output/data-uri-limit) has been changed from `10000 (10kB)` to `4096 (4KiB)`. diff --git a/website/docs/en/config/dev/asset-prefix.mdx b/website/docs/en/config/dev/asset-prefix.mdx index aa09f8fafd..dc63e72a8d 100644 --- a/website/docs/en/config/dev/asset-prefix.mdx +++ b/website/docs/en/config/dev/asset-prefix.mdx @@ -9,7 +9,7 @@ Set the URL prefix of static assets in [development mode](/config/mode). This config is only used in development mode. In the production mode, please use the [output.assetPrefix](/config/output/asset-prefix) to set the URL prefix. -## Default Value +## Default value The default value of `dev.assetPrefix` is the same as [server.base](/config/server/base). @@ -28,7 +28,7 @@ export default { }; ``` -## Boolean Type +## Boolean type If `assetPrefix` is set to `true`, the URL prefix will be `http://localhost:/`: @@ -101,7 +101,7 @@ export default { }; ``` -## Path Types +## Path types assetPrefix can be set to the following types of paths: diff --git a/website/docs/en/config/dev/cli-shortcuts.mdx b/website/docs/en/config/dev/cli-shortcuts.mdx index a0f6b3b635..f4043118f7 100644 --- a/website/docs/en/config/dev/cli-shortcuts.mdx +++ b/website/docs/en/config/dev/cli-shortcuts.mdx @@ -16,7 +16,7 @@ type CliShortcuts = Whether to enable CLI shortcuts. -## All Shortcuts +## All shortcuts Press `h + Enter` to show all shortcuts: @@ -51,7 +51,7 @@ export default { }; ``` -## Custom Shortcuts +## Custom shortcuts `custom` option can be used to custom shortcuts, the value is a function that receives the default shortcuts array and returns a new shortcuts array. @@ -92,7 +92,7 @@ export default { }; ``` -## Print Help +## Print help `help` option can be used to control whether to print the help hint when the server is started: diff --git a/website/docs/en/config/dev/client.mdx b/website/docs/en/config/dev/client.mdx index 73d9d43add..6deebe14c0 100644 --- a/website/docs/en/config/dev/client.mdx +++ b/website/docs/en/config/dev/client.mdx @@ -83,7 +83,7 @@ During the HMR process, the page will make GET requests to get hot-update files, Hot-update files are considered to be static assets. If you need to configure the URL for hot-update files, please use the [dev.assetPrefix](/config/dev/asset-prefix) option. -## Error Overlay +## Error overlay The `dev.client.overlay` option allows you to choose whether or not to enable the error overlay feature. diff --git a/website/docs/en/config/dev/lazy-compilation.mdx b/website/docs/en/config/dev/lazy-compilation.mdx index 960ffa05fc..ec43fffe5c 100644 --- a/website/docs/en/config/dev/lazy-compilation.mdx +++ b/website/docs/en/config/dev/lazy-compilation.mdx @@ -41,7 +41,7 @@ With lazy compilation enabled, Rspack will only compile the entrypoints and dyna ## Example -### Enable Lazy Compilation +### Enable lazy compilation ```ts export default { @@ -64,7 +64,7 @@ export default { }; ``` -### Entry Modules +### Entry modules Use `lazyCompilation.entries` to control whether to lazily compile entry modules: @@ -85,7 +85,7 @@ When lazily compiling entry modules, please note: - It only applies to multi-page applications (MPA) and does not optimize single-page applications (SPA). - When you visit a page, you need to wait for the page to finish compiling before you can see its content. -### Async Modules +### Async modules Use `lazyCompilation.imports` to control whether to lazily compile [dynamic imported](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) modules. diff --git a/website/docs/en/config/dev/live-reload.mdx b/website/docs/en/config/dev/live-reload.mdx index 857bc7a389..76d4f1a00e 100644 --- a/website/docs/en/config/dev/live-reload.mdx +++ b/website/docs/en/config/dev/live-reload.mdx @@ -11,7 +11,7 @@ Please refer to [Hot Module Replacement](/guide/advanced/hmr) for more informati ## Disabling liveReload -If you need to disable liveReload, you can set both `dev.hmr` and `dev.liveReload` to `false`. Then, no Web Socket requests will be made to the dev server on the page, and the page will not automatically refresh when file change. +If you need to disable liveReload, you can set both `dev.hmr` and `dev.liveReload` to `false`. Then, no WebSocket requests will be made to the dev server on the page, and the page will not automatically refresh when file change. ```js export default { diff --git a/website/docs/en/config/dev/setup-middlewares.mdx b/website/docs/en/config/dev/setup-middlewares.mdx index 17b3fd5645..13157972da 100644 --- a/website/docs/en/config/dev/setup-middlewares.mdx +++ b/website/docs/en/config/dev/setup-middlewares.mdx @@ -26,7 +26,7 @@ type SetupMiddlewares = Array< Provides the ability to execute a custom function and apply custom middlewares. -## Execution Order +## Execution order The order among several different types of middleware is: `unshift` => internal middlewares => `push`. diff --git a/website/docs/en/config/dev/write-to-disk.mdx b/website/docs/en/config/dev/write-to-disk.mdx index c69666c5e2..c7588323f6 100644 --- a/website/docs/en/config/dev/write-to-disk.mdx +++ b/website/docs/en/config/dev/write-to-disk.mdx @@ -9,7 +9,7 @@ Controls whether the build output from development mode is written to disk. In development mode, Rsbuild stores the build outputs in memory on the dev server by default, rather than writing then to disk. This can reduce the overhead of fs operations. You can refer to [View Static Assets](/guide/basic/server#view-static-assets) to view all static assets generated in the current build. ::: -## Writing to Disk +## Writing to disk You can choose to write the build output to disk, which is usually used for inspecting the content of the build output or configuring proxy rules for static assets. @@ -27,7 +27,7 @@ export default { Setting `writeToDisk: true` is used for viewing the build output from development mode. It does not change the behavior of the dev server. When accessing files through a browser, the dev server will still read the file content from memory. ::: -## Matching Specific Files +## Matching specific files You can also set `dev.writeToDisk` to a function to match only certain files. When the function returns `false`, the file will not be written; when it returns `true`, the file will be written to disk. diff --git a/website/docs/en/config/html/crossorigin.mdx b/website/docs/en/config/html/crossorigin.mdx index 7b3798713e..c583f077df 100644 --- a/website/docs/en/config/html/crossorigin.mdx +++ b/website/docs/en/config/html/crossorigin.mdx @@ -45,7 +45,7 @@ The `