Skip to content

Commit

Permalink
fix(typescript): Support custom path in build mode (#186)
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Helmer <justin@intellimize.com>
  • Loading branch information
justinhelmer and Justin Helmer authored Dec 14, 2022
1 parent a3d9684 commit d1c422c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/vite-plugin-checker/src/checkers/typescript/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,13 @@ export class TscChecker extends Checker<'typescript'> {
// Custom config path
if (tsconfigPath) {
const fullConfigPath = root ? path.join(root, tsconfigPath) : tsconfigPath
args = args.concat(['-p', fullConfigPath])

// In build mode, the tsconfig path is an argument to -b, e.g. "tsc -b [path]"
if (buildMode) {
args = args.concat([fullConfigPath])
} else {
args = args.concat(['-p', fullConfigPath])
}
}

return ['tsc', args]
Expand Down

0 comments on commit d1c422c

Please sign in to comment.