Skip to content

Commit f7816e4

Browse files
committed
fix: remove ts mapping if loader present
fixes #2083
1 parent 9f3ffdb commit f7816e4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/config/defaults.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var ignoreRoot = require('ignore-by-default').directories();
22

33
// default options for config.options
4-
module.exports = {
4+
const defaults = {
55
restartable: 'rs',
66
colours: true,
77
execMap: {
@@ -12,7 +12,7 @@ module.exports = {
1212
// compatible with linux, mac and windows, or make the default.js
1313
// dynamically append the `.cmd` for node based utilities
1414
},
15-
ignoreRoot: ignoreRoot.map(_ => `**/${_}/**`),
15+
ignoreRoot: ignoreRoot.map((_) => `**/${_}/**`),
1616
watch: ['*.*'],
1717
stdin: true,
1818
runOnChangeOnly: false,
@@ -22,7 +22,11 @@ module.exports = {
2222
// but also includes stderr. If this is false, data is still dispatched via
2323
// nodemon.on('stdout/stderr')
2424
stdout: true,
25-
watchOptions: {
26-
27-
},
25+
watchOptions: {},
2826
};
27+
28+
if ((process.env.NODE_OPTIONS || '').includes('--loader')) {
29+
delete defaults.execMap.ts;
30+
}
31+
32+
module.exports = defaults;

0 commit comments

Comments
 (0)