Skip to content

Commit ed07723

Browse files
authored
docs: modify examples of redirect.dts.extension (#771)
1 parent b3cf9ea commit ed07723

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/plugin-dts/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ Whether to automatically redirect the file extension to import paths based on th
228228
import { foo } from './foo'; // source code of './src/bar.ts' ↓
229229
import { foo } from './foo.mjs'; // expected output of './dist/bar.d.mts'
230230

231-
import { foo } from './foo.ts'; // source code of './src/utils/index.ts' ↓
232-
import { foo } from './foo.mjs'; // expected output './dist/utils/index.d.mts'
231+
import { foo } from './foo.ts'; // source code of './src/bar.ts' ↓
232+
import { foo } from './foo.mjs'; // expected output of './dist/bar.d.mts'
233233
```
234234

235235
- When set to `false`, the file extension will remain unchanged from the original import path in the rewritten import path of the output file (regardless of whether it is specified or specified as any value).

website/docs/en/config/lib/redirect.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,6 @@ For the `.d.mts` declaration file, in some scenarios, the full extension of the
251251
import { foo } from './foo'; // source code of './src/bar.ts' ↓
252252
import { foo } from './foo.mjs'; // expected output of './dist/bar.d.mts'
253253

254-
import { foo } from './foo.ts'; // source code of './src/utils/index.ts' ↓
255-
import { foo } from './foo.mjs'; // expected output './dist/utils/index.d.mts'
254+
import { foo } from './foo.ts'; // source code of './src/bar.ts' ↓
255+
import { foo } from './foo.mjs'; // expected output of './dist/bar.d.mts'
256256
```

website/docs/zh/config/lib/redirect.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,6 @@ TypeScript 类型文件的扩展名与 [dts.autoExtension](/config/lib/dts#dtsau
251251
import { foo } from './foo'; // './src/bar.ts' 的源码 ↓
252252
import { foo } from './foo.mjs'; // './dist/bar.d.mts' 预期生成的代码
253253

254-
import { foo } from './foo.ts'; // './src/utils/index.ts' 的源码 ↓
255-
import { foo } from './foo.mjs'; // './dist/utils/index.d.mts' 预期生成的代码
254+
import { foo } from './foo.ts'; // './src/bar.ts' 的源码 ↓
255+
import { foo } from './foo.mjs'; // './dist/bar.d.mts' 预期生成的代码
256256
```

0 commit comments

Comments
 (0)