Skip to content

Commit df1ac1d

Browse files
authored
Disable loading files from configuration (#700)
1 parent 9d15a72 commit df1ac1d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/index.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const DEFAULTS: Options = {
9696
/**
9797
* Default TypeScript compiler options required by `ts-node`.
9898
*/
99-
const DEFAULT_COMPILER_OPTIONS = {
99+
const TS_NODE_COMPILER_OPTIONS = {
100100
sourceMap: true,
101101
inlineSourceMap: false,
102102
inlineSources: true,
@@ -456,7 +456,7 @@ function readConfig (
456456
project?: string | null,
457457
noProject?: boolean | null
458458
): ts.ParsedCommandLine {
459-
let config = { compilerOptions: {} }
459+
let config: any = { compilerOptions: {} }
460460
let basePath = normalizeSlashes(cwd)
461461
let configFileName: string | undefined = undefined
462462

@@ -479,8 +479,12 @@ function readConfig (
479479
}
480480
}
481481

482+
// Remove resolution of "files".
483+
config.files = []
484+
config.includes = []
485+
482486
// Override default configuration options `ts-node` requires.
483-
config.compilerOptions = Object.assign({}, config.compilerOptions, compilerOptions, DEFAULT_COMPILER_OPTIONS)
487+
config.compilerOptions = Object.assign({}, config.compilerOptions, compilerOptions, TS_NODE_COMPILER_OPTIONS)
484488

485489
return fixConfig(ts.parseJsonConfigFileContent(config, ts.sys, basePath, undefined, configFileName))
486490
}

0 commit comments

Comments
 (0)