Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions example.ts
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@

console.log('Some .ts code reproducing a bug');
declare const require: any;

// When this file is added to `getScriptFileNames`, `getProjectVersion` is not
// incremented.
// Therefore, when ts-node tries to get the transpiled output of this file,
// TypeScript erroneously uses the old `Program` instance where this file is considered
// "external" and therefore is not emitted.
import './src/node_modules/causes-problem';

require('./src/no-problem');
2 changes: 2 additions & 0 deletions src/no-problem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
console.log('this file will be transpiled no problem');
export const foo = 123;
2 changes: 2 additions & 0 deletions src/node_modules/causes-problem.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ts-node": {
"skipIgnore": true
}
}