Skip to content

Commit 0509e8c

Browse files
committed
feat: support paths
1 parent 740cafa commit 0509e8c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tsconfig-to-swcconfig",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"description": "Convert tsconfig to swc config",
55
"main": "dist/index.js",
66
"scripts": {

src/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export function convert(
1010
/** swc configs to override */
1111
swcOptions: swcType.Options = {},
1212
) {
13+
// https://json.schemastore.org/tsconfig
1314
const {
1415
esModuleInterop = false,
1516
sourceMap = 'inline', // notice here we default it to 'inline' instead of false
@@ -23,6 +24,7 @@ export function convert(
2324
strict = false,
2425
alwaysStrict = false,
2526
noImplicitUseStrict = false,
27+
paths,
2628
} = getTSOptions(filename, cwd) ?? {}
2729
const module = (_module as unknown as string)?.toLowerCase()
2830

@@ -57,6 +59,7 @@ export function convert(
5759
keepClassNames: !['es3', 'es5', 'es6', 'es2015'].includes(
5860
(target as string).toLowerCase(),
5961
),
62+
paths,
6063
},
6164
} as swcType.Options,
6265
swcOptions,

0 commit comments

Comments
 (0)