Skip to content

Commit 27cb391

Browse files
authored
docs: polish FAQ wording (#6641)
1 parent b57ebdd commit 27cb391

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

website/docs/en/guide/faq/exceptions.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Exceptions FAQ
22

3-
### Find ESNext code in the compiled files?
3+
### Seeing ESNext code in the compiled files?
44

5-
By default, Rsbuild does not compile JavaScript files under `node_modules`. If an npm package contains ESNext syntax, it will be bundled into the output.
5+
By default, Rsbuild does not compile JavaScript files in `node_modules`. If an npm package includes ESNext syntax, that code is bundled as is.
66

77
To compile these files, use the [source.include](/config/source/include) configuration to specify additional directories or modules.
88

99
---
1010

11-
### Build error `Error: [object Object] is not a PostCSS plugin` ?
11+
### Build error `Error: [object Object] is not a PostCSS plugin`?
1212

13-
Rsbuild uses PostCSS v8. If you encounter the `Error: [object Object] is not a PostCSS plugin` error during compilation, it's usually caused by using an incompatible version of PostCSS. For example, the `postcss` peer dependency version in `cssnano` may not match the expected version.
13+
Rsbuild uses PostCSS v8. If you encounter this error during compilation, it's usually because a package is using an incompatible PostCSS version. For example, the `postcss` peer dependency version in `cssnano` may not match the expected version.
1414

1515
To find unmet peer dependencies, run `npm ls postcss`. Then fix the issue by specifying the correct PostCSS version in your package.json.
1616

@@ -37,13 +37,13 @@ File was processed with these loaders:
3737
You may need an additional loader to handle the result of these loaders.
3838
```
3939

40-
Check whether you're referencing unsupported file formats, and configure the appropriate Rspack loader to handle them.
40+
Check whether you're importing unsupported file formats, and configure the appropriate Rspack loader to handle them.
4141

4242
---
4343

4444
### Compilation error `export 'foo' (imported as 'foo') was not found in './utils'`?
4545

46-
This error means your code is importing an export that doesn't exist.
46+
This error means your code is importing a symbol that doesn't exist.
4747

4848
For example, in the following code, `index.ts` is importing the `foo` variable from `utils.ts`, but `utils.ts` only exports the `bar` variable.
4949

@@ -88,7 +88,7 @@ export { Foo } from './utils'; // Incorrect
8888
export type { Foo } from './utils'; // Correct
8989
```
9090

91-
In some cases, a third-party dependency you can't modify causes this error. If you're certain the issue doesn't affect your application, you can change the log level from `error` to `warn`:
91+
In some cases, a third-party dependency you can't modify causes this error. If you're sure it doesn't affect your application, you can downgrade the log level from `error` to `warn`:
9292

9393
```ts title="rsbuild.config.ts"
9494
export default {

website/docs/en/guide/faq/features.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Features FAQ
22

3-
### How to import UI component library on demand?
3+
### How to import a UI component library on demand?
44

5-
To configure the on-demand import of the component library, you can configure it through [source.transformImport](/config/source/transform-import), which is equivalent to [babel-plugin-import](https://npmjs.com/package/babel-plugin-import).
5+
To enable on-demand imports for a component library, configure [source.transformImport](/config/source/transform-import). This works the same way as [babel-plugin-import](https://npmjs.com/package/babel-plugin-import).
66

77
```ts
88
export default {
@@ -22,13 +22,13 @@ export default {
2222

2323
### How to run ESLint during compilation?
2424

25-
For the sake of compilation performance, Rsbuild will not perform ESLint verification during the compilation process by default. If you require this feature, you can use Rsbuild's [ESLint plugin](https://github.com/rspack-contrib/rsbuild-plugin-eslint).
25+
To protect compilation performance, Rsbuild doesn't run ESLint checks during builds by default. If you need ESLint in the pipeline, use the [ESLint plugin](https://github.com/rspack-contrib/rsbuild-plugin-eslint).
2626

2727
---
2828

2929
### How to configure CDN path for static assets?
3030

31-
To upload static assets such as JS and CSS to CDN for use, set the URL prefix of static assets through the [output.assetPrefix](/config/output/asset-prefix) configuration.
31+
To serve static assets like JS and CSS from a CDN, set the asset URL prefix with [output.assetPrefix](/config/output/asset-prefix).
3232

3333
```js
3434
export default {
@@ -42,17 +42,17 @@ export default {
4242

4343
### How to remove console after production build?
4444

45-
For the production build, we can remove the `console` from the code, so as to avoid the log of the development mode being output to the production.
45+
In production builds, you can strip `console` calls to avoid shipping development logs.
4646

47-
Rsbuild provides a configuration option to remove console by default, please see [performance.removeConsole](/config/performance/remove-console).
47+
Rsbuild provides a built-in option for removing console statements. See [performance.removeConsole](/config/performance/remove-console).
4848

4949
---
5050

5151
### How to view the final generated Rspack configuration?
5252

53-
By using the Rsbuild debug mode, you can view the Rspack configuration generated by Rsbuild.
53+
Use Rsbuild's debug mode to view the Rspack configuration that Rsbuild generates.
5454

55-
You can enable the debug mode of Rsbuild by adding the `DEBUG=rsbuild` environment variable when performing the build. In this mode, the internally generated Rspack configuration will be outputted to the "dist" directory.
55+
Enable debug mode by setting the `DEBUG=rsbuild` environment variable when running a build. In this mode, the generated Rspack configuration is written to the `dist` directory.
5656

5757
```bash
5858
➜ DEBUG=rsbuild pnpm dev
@@ -73,9 +73,9 @@ config inspection completed, generated files:
7373

7474
### How to ignore specific warnings?
7575

76-
By default, Rsbuild will print all error and warning logs generated by the build process.
76+
By default, Rsbuild prints all errors and warnings from the build.
7777

78-
If a large number of warning logs are generated by a third-party package and you want to ignore them, specific warning logs can be ignored through the `ignoreWarnings` configuration provided by Rspack.
78+
If a noisy third-party package produces many warnings, you can silence specific messages with Rspack's `ignoreWarnings` configuration.
7979

8080
```ts
8181
export default {

0 commit comments

Comments
 (0)