Skip to content

Commit 355d496

Browse files
committed
Update(Build): Replace "load-tsconfig" with "get-tsconfig"
1 parent 72b0f29 commit 355d496

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

packages/techor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
"escodegen": "^2.1.0",
8080
"execa": "^7.2.0",
8181
"explore-config": "workspace:^",
82+
"get-tsconfig": "^4.7.2",
8283
"hrtime": "^0.5.0",
83-
"load-tsconfig": "^0.2.5",
8484
"lodash.isequal": "^4.5.0",
8585
"pkg-types": "^1.0.1",
8686
"pretty-bytes": "^6.1.0",

packages/techor/src/plugins/swc.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Plugin } from 'rollup'
2-
// @ts-expect-error Cannot find module 'load-tsconfig' or its corresponding type declarations.ts(2307)
3-
import { loadTsConfig } from 'load-tsconfig'
2+
import { getTsconfig } from 'get-tsconfig'
43
import { Options as SWCOptions, transform } from '@swc/core'
54
import extend from '@techor/extend'
65
import { FilterPattern, createFilter } from '@rollup/pluginutils'
@@ -13,7 +12,7 @@ export type Options = SWCOptions & {
1312

1413
export default function swc({ tsconfigFile, include, exclude, minify, ...options }: Options = {}): Plugin {
1514
const filter = createFilter(include, exclude)
16-
const compilerOptions = tsconfigFile === false ? {} : loadTsConfig('.', tsconfigFile === true ? undefined : tsconfigFile)?.data?.compilerOptions || {}
15+
const compilerOptions = tsconfigFile === false ? {} : getTsconfig('.', tsconfigFile === true ? undefined : tsconfigFile)?.config?.compilerOptions || {}
1716
let swcOptions = {
1817
jsc: {
1918
target: compilerOptions.target,

pnpm-lock.yaml

Lines changed: 3 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)