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: packages/plugin-dts/README.md
+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
@@ -201,7 +201,7 @@ pluginDts({
201
201
202
202
Whether to automatically redirect the import paths of Typescript declaration output files.
203
203
204
-
- When set to `true`, the [compilerOptions.paths](https://typescriptlang.org/tsconfig#paths) configured in the `tsconfig.json` file will take effect, and the import path of the DTS output file will be redirected to the corresponding relative path.
204
+
- When set to `true`, Rslib will redirect the import path in the DTS output file to the corresponding relative path based on the [compilerOptions.paths](https://typescriptlang.org/tsconfig#paths) configured in `tsconfig.json`.
205
205
206
206
```ts
207
207
// `compilerOptions.paths` is set to `{ "@/*": ["src/*"] }`
Copy file name to clipboardExpand all lines: website/docs/en/config/lib/redirect.mdx
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ overviewHeaders: [2, 3]
6
6
7
7
:::info
8
8
9
-
`redirect` is the unique configuration for [bundleless mode](/guide/basic/output-structure#bundle--bundleless). It will not take effect in bundle mode where all output files are packaged into a single file, eliminating the need for import path redirection.
9
+
`redirect` is the unique configuration for [bundleless mode](/guide/basic/output-structure#bundle--bundleless). It will not take effect in bundle mode where all output files are bundled into a single file, eliminating the need for import path redirection.
10
10
11
11
:::
12
12
@@ -58,7 +58,7 @@ const defaultRedirect = {
58
58
59
59
Configure the redirect for import paths in output files.
60
60
61
-
In bundleless mode, there are often needs such as using aliases or automatically appending suffixes for ESM products. The `redirect` configuration is designed to address these issues.
61
+
In bundleless mode, there are often needs such as using aliases or automatically appending suffixes for ESM outputs. The `redirect` configuration is designed to address these issues.
62
62
63
63
## redirect.js
64
64
@@ -190,10 +190,12 @@ Controls the redirect of the import paths of output asset files.
190
190
-**Type:**`boolean`
191
191
-**Default:**`true`
192
192
193
-
When set to `true`, the paths of imported resource files will be rewritten to the corresponding JavaScript product file.
193
+
When set to `true`, the paths of imported asset files will be redirected to the corresponding JavaScript output file.
194
194
195
195
When set to `false`, the file extension will remain unchanged from the original import path.
@@ -210,7 +212,7 @@ Whether to automatically redirect the import paths of Typescript declaration out
210
212
-**Type:**`boolean`
211
213
-**Default:**`true`
212
214
213
-
When set to `true`, the [compilerOptions.paths](https://typescriptlang.org/tsconfig#paths) configured in the `tsconfig.json` file will take effect, and the import path of the DTS output file will be redirected to the corresponding relative path.
215
+
When set to `true`, Rslib will redirect the import path in the DTS output file to the corresponding relative path based on the [compilerOptions.paths](https://typescriptlang.org/tsconfig#paths) configured in `tsconfig.json`.
214
216
215
217
When set to `false`, the original import path will remain unchanged.
216
218
@@ -243,7 +245,7 @@ The extension of the TypeScript declaration file is related to the [dts.autoExte
243
245
244
246
-**Example:**
245
247
246
-
For the `.d.mts` file, in some scenarios, the full extension of the module import path is needed to load correctly.
248
+
For the `.d.mts`declaration file, in some scenarios, the full extension of the module import path is needed to load correctly.
0 commit comments