You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/en/config/lib/bundle.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ We should specify the entry file for the build.
13
13
14
14
### bundle: true
15
15
16
-
When `bundle` is set to `true`, the entry should be set to the entry file. The default entry in bundle mode is `src/index.(ts|js|tsx|jsx|mjs|cjs)`. You should make sure that the entry file exists, or customize entry through the [source.entry](https://rsbuild.rs/config/source/entry) configuration.
16
+
When `bundle` is set to `true`, the entry should be set to the entry file. The default entry in bundle mode is `src/index.(ts|js|tsx|jsx|mjs|cjs)`. You should make sure that the entry file exists, or customize the entry through the [source.entry](https://rsbuild.rs/config/source/entry) configuration.
Copy file name to clipboardExpand all lines: website/docs/en/config/lib/out-base.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,6 @@ dist
53
53
54
54
::: tip
55
55
56
-
When the project needs to generate declaration files, to ensure that the generated declaration files and JS files maintain a consistent output directory structure, if you modify the `outBase` configuration, you need to make sure that the [rootDir](https://www.typescriptlang.org/tsconfig/rootDir.html) in `tsconfig.json` to the same path.
56
+
When the project needs to generate declaration files, to ensure that the generated declaration files and JS files maintain a consistent output directory structure, if you modify the `outBase` configuration, you need to make sure that the [rootDir](https://www.typescriptlang.org/tsconfig/rootDir.html) in `tsconfig.json`is set to the same path.
Copy file name to clipboardExpand all lines: website/docs/en/config/lib/shims.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Options:
76
76
);
77
77
```
78
78
79
-
- `false`: the `import.meta.url` will be leave as is, which will cause a runtime error when running the output.
79
+
- `false`: the `import.meta.url` will be left as is, which will cause a runtime error when running the output.
80
80
81
81
## shims.esm
82
82
@@ -110,7 +110,7 @@ Options:
110
110
console.log(src_filename);
111
111
```
112
112
113
-
- `false`: the `__filename` will be leave as is, which will cause a runtime error when running the output.
113
+
- `false`: the `__filename` will be left as is, which will cause a runtime error when running the output.
114
114
115
115
### shims.esm.\_\_dirname
116
116
@@ -139,7 +139,7 @@ Options:
139
139
console.log(src_dirname);
140
140
```
141
141
142
-
- `false`: the `__dirname` will be leave as is, which will cause a runtime error when running the output.
142
+
- `false`: the `__dirname` will be left as is, which will cause a runtime error when running the output.
143
143
144
144
### shims.esm.require
145
145
@@ -149,7 +149,7 @@ Whether to inject shims for the global `require` of CommonJS in ESM output.
149
149
150
150
Options:
151
151
152
-
- `true`: when [format](/config/lib/format) is `esm`, there will be a `require` that created by `createRequire` at the beginning of the output which can be accessed in source code like the global `require` like CommonJS.
152
+
- `true`: when [format](/config/lib/format) is `esm`, there will be a `require` that is created by `createRequire` at the beginning of the output which can be accessed in source code like the global `require` like CommonJS.
153
153
154
154
For example, given the following source code:
155
155
@@ -181,4 +181,4 @@ Options:
181
181
lazyFn('./other.js', require);
182
182
```
183
183
184
-
- `false`: the `require` will be leave as is, which will cause a runtime error when running the output.
184
+
- `false`: the `require` will be left as is, which will cause a runtime error when running the output.
Copy file name to clipboardExpand all lines: website/docs/en/guide/advanced/module-federation.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,8 +181,8 @@ Then run the `dev` command can start the Module Federation development mode, ena
181
181
First, set up Storybook with the Rslib project. You can refer to the [Storybook chapter](/guide/advanced/storybook) to learn how to do this. In this chapter, we will use React as the framework for our example.
182
182
183
183
1. Install the following Storybook addons to let Storybook work with Rslib Module Federation:
184
-
-[storybook-addon-rslib](https://www.npmjs.com/package/storybook-addon-rslib): Storybook addon that let Storybook to load the Rslib config.
185
-
-[@module-federation/storybook-addon](https://www.npmjs.com/package/@module-federation/rsbuild-plugin): Storybook addon that set up the Module Federation config for Storybook.
184
+
-[storybook-addon-rslib](https://www.npmjs.com/package/storybook-addon-rslib): Storybook addon that lets Storybook load the Rslib config.
185
+
-[@module-federation/storybook-addon](https://www.npmjs.com/package/@module-federation/rsbuild-plugin): Storybook addon that sets up the Module Federation config for Storybook.
Copy file name to clipboardExpand all lines: website/docs/en/guide/faq/features.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ export default defineConfig({
39
39
40
40
### How to skip the processing of static asset files in bundleless mode?
41
41
42
-
In bundleless mode, Rslib transforms the source static asset file into a JavaScript file and a static asset file that is emitted according to [output.distPath](/config/rsbuild/output#outputdistpath) by default with preserving the `import` or `require` statements for static assets. To skip the above processing of static asset files, you need to:
42
+
In bundleless mode, Rslib transforms the source static asset file into a JavaScript file and a static asset file that is emitted according to [output.distPath](/config/rsbuild/output#outputdistpath) by default, while preserving the `import` or `require` statements for static assets. To skip the above processing of static asset files, you need to:
43
43
44
44
1. Set `source.entry` to remove static asset files from the entry.
45
45
2. Set `output.copy` to copy static asset files to the output directory.
Copy file name to clipboardExpand all lines: website/docs/en/guide/migration/tsup.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,6 @@ Here is the corresponding Rslib configuration for tsup configuration:
66
66
67
67
## Contents supplement
68
68
69
-
The current document only covers part of the migration process. If you find suitable content to add, feel free to contribute to the documentation via pull request 🤝.
69
+
The current document only covers part of the migration process. If you find suitable content to add, feel free to contribute to the documentation via a pull request 🤝.
70
70
71
71
> The documentation for Rslib can be found in the [rslib/website](https://github.com/web-infra-dev/rslib/tree/main/website) directory.
0 commit comments