Skip to content

Commit

Permalink
fix: parse .ts config error
Browse files Browse the repository at this point in the history
  • Loading branch information
showlotus committed Aug 14, 2024
1 parent 9bf0d74 commit fe48e91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ export default class Parser extends PubSub {

parseJsConfig(content: string): ConfigData {
const data = this.formatAst(
babelParser.parse(content, { sourceType: 'module' }),
babelParser.parse(content, {
sourceType: 'module',
plugins: ['typescript'],
}),
)
if (!data) {
return {}
Expand Down

0 comments on commit fe48e91

Please sign in to comment.