diff --git a/lib/config/defaults.js b/lib/config/defaults.js index e2a448b4..c1795b99 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -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: { @@ -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, @@ -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;