Skip to content

Commit

Permalink
fix: remove ts mapping if loader present
Browse files Browse the repository at this point in the history
fixes #2083
  • Loading branch information
remy committed Mar 22, 2023
1 parent 9f3ffdb commit f7816e4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/config/defaults.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var ignoreRoot = require('ignore-by-default').directories();

// default options for config.options
module.exports = {
const defaults = {
restartable: 'rs',
colours: true,
execMap: {
Expand All @@ -12,7 +12,7 @@ module.exports = {
// compatible with linux, mac and windows, or make the default.js
// dynamically append the `.cmd` for node based utilities
},
ignoreRoot: ignoreRoot.map(_ => `**/${_}/**`),
ignoreRoot: ignoreRoot.map((_) => `**/${_}/**`),
watch: ['*.*'],
stdin: true,
runOnChangeOnly: false,
Expand All @@ -22,7 +22,11 @@ module.exports = {
// but also includes stderr. If this is false, data is still dispatched via
// nodemon.on('stdout/stderr')
stdout: true,
watchOptions: {

},
watchOptions: {},
};

if ((process.env.NODE_OPTIONS || '').includes('--loader')) {
delete defaults.execMap.ts;
}

module.exports = defaults;

0 comments on commit f7816e4

Please # to comment.