Skip to content

Commit 121ae98

Browse files
committed
chore: update
1 parent 865fa2e commit 121ae98

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

website/docs/en/guide/advanced/json-files.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Rslib supports import JSON files in code.
66

77
You can directly reference JSON files in JavaScript files.
88

9-
### Default Import
9+
### Default import
1010

1111
```json title="example.json"
1212
{
@@ -29,7 +29,7 @@ In Bundleless mode, JSON files only support named imports.
2929

3030
:::
3131

32-
### Named Import
32+
### Named import
3333

3434
Rslib also supports referencing JSON files through named imports:
3535

website/docs/en/guide/advanced/static-assets.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ When developing libraries that will be consumed again by other build tools as in
210210

211211
The automatic inlining size threshold can be modified via the [output.dataUriLimit](/config/rsbuild/output#outputdataurilimit) configuration option. When the [format](/config/lib/format) is `cjs` or `esm`, Rslib defaults the `output.dataUriLimit` to `0`, not inlining any static assets.
212212

213-
## Build Output Directory
213+
## Build output directory
214214

215215
Once static assets are referenced, they will automatically be output to the build output directory. You can:
216216

website/docs/en/guide/advanced/svgr-files.mdx

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ By default, Rslib treats SVG images as static assets.
44

55
By adding the [@rsbuild/plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr) plugin, Rslib supports invoking [SVGR](https://react-svgr.com/) to convert SVG images into React components for use.
66

7-
## Quick Start
7+
## Quick start
88

9-
### Install the Plugin
9+
### Install the plugin
1010

1111
You can install the plugin using the following command:
1212

1313
import { PackageManagerTabs } from '@theme';
1414

1515
<PackageManagerTabs command="add @rsbuild/plugin-svgr -D" />
1616

17-
### Register the Plugin
17+
### Register the plugin
1818

1919
You can register the plugin in the `rslib.config.ts` file:
2020

@@ -28,7 +28,7 @@ export default {
2828

2929
## Examples
3030

31-
### Bundle Mode
31+
### Bundle mode
3232

3333
In Bundle mode, all usages supported by the [Rsbuild SVGR plugin](https://rsbuild.dev/plugins/list/plugin-svgr) are available. The only difference is that when using an SVG file in URL form, Rslib will retain the `import` statement for the static asset in the output according to [Referencing Static Assets](/guide/advanced/static-assets).
3434

@@ -55,11 +55,11 @@ console.log(logoURL);
5555
- Enable default imports by setting [svgrOptions.exportType](https://rsbuild.dev/plugins/list/plugin-svgr#svgroptionsexporttype) to `'default'`.
5656
- Enable mixed imports through the [mixedImport](https://rsbuild.dev/plugins/list/plugin-svgr#mixedimport) option to use both default and named imports.
5757

58-
### Bundleless Mode
58+
### Bundleless mode
5959

6060
In Bundleless mode, since each file undergoes code transformation independently, the import ways of `?react` and `?url` are not supported. However, the following two usage forms are supported:
6161

62-
#### Named Import
62+
#### Named import
6363

6464
`@rsbuild/plugin-svgr` supports named import of `ReactComponent` to use SVGR. You need to set [svgrOptions.exportType](https://rsbuild.dev/plugins/list/plugin-svgr#svgroptionsexporttype) to `'named'`.
6565

@@ -82,7 +82,7 @@ All `.svg` files will be converted into React components. At this time, you can:
8282
- Exclude files that do not need to be converted by setting [exclude](https://rsbuild.dev/plugins/list/plugin-svgr#exclude).
8383
- Change to default export by setting [svgrOptions.exportType](https://rsbuild.dev/plugins/list/plugin-svgr#svgroptionsexporttype) to `'default'`.
8484

85-
#### Mixed Import
85+
#### Mixed import
8686

8787
If your library has both URL and React component import forms for SVG files, you can also use mixed imports.
8888

0 commit comments

Comments
 (0)