diff --git a/src/plugin.ts b/src/plugin.ts index 58126d8f..4aef4eed 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -224,8 +224,8 @@ export class Plugin implements IPlugin { } this._debug(`loading IDs from ${this.commandsDir}`) const patterns = [ - '**/*.+(js|ts)', - '!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js)', + '**/*.+(js|ts|tsx)', + '!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js)?(x)', ] const ids = globby.sync(patterns, {cwd: this.commandsDir}) .map(file => { diff --git a/src/ts-node.ts b/src/ts-node.ts index ca59cc5f..5af5c394 100644 --- a/src/ts-node.ts +++ b/src/ts-node.ts @@ -75,6 +75,7 @@ function registerTSNode(root: string) { sourceMap: true, rootDirs, typeRoots, + jsx: 'react', }, }) } finally {