Skip to content

Commit

Permalink
Ditch fs.readFile since parseTsconfig already throws when something i…
Browse files Browse the repository at this point in the history
…s wrong with the file
  • Loading branch information
peschee committed Feb 3, 2024
1 parent 28b7598 commit 15cc32c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EsbuildPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class EsbuildPlugin implements Plugin {
this.logger = logger;
if (this.esbuildConfig.tsconfig) {
const parsedTsconfig = await parseTsconfig(this.esbuildConfig.tsconfig);
this.tsconfigRaw = parsedTsconfig ? JSON.stringify(parsedTsconfig) : await promisify(fs.readFile)(this.esbuildConfig.tsconfig, 'utf8');
this.tsconfigRaw = JSON.stringify(parsedTsconfig);
}
}

Expand Down

0 comments on commit 15cc32c

Please sign in to comment.