We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e00a6e commit 5680b3fCopy full SHA for 5680b3f
index.js
@@ -1,5 +1,7 @@
1
var path = require('path');
2
3
+var endsInTs = /\.ts$/;
4
+var endsInTsx = /\.tsx$/;
5
var endsInBabelJs = /\.babel\.[jt]s(x)$/;
6
7
var mjsStub = path.join(__dirname, 'mjs-stub');
@@ -162,6 +164,9 @@ var extensions = {
162
164
mod.register({
163
165
extensions: ['.ts'],
166
target: 'node' + process.version.slice(1),
167
+ hookMatcher: function(file) {
168
+ return endsInTs.test(file);
169
+ },
170
});
171
},
172
@@ -186,6 +191,9 @@ var extensions = {
186
191
187
192
extensions: ['.tsx'],
188
193
194
195
+ return endsInTsx.test(file);
196
189
197
190
198
199
0 commit comments