mirror of
https://github.com/hanzoai/ts-node.git
synced 2026-10-30 19:36:25 +00:00
* results of lint-fix * Remove tslint:disable comments * re-run lint-fix after removing tslint:disable comments
17 lines
345 B
TypeScript
17 lines
345 B
TypeScript
const extensions = ['.tsx'];
|
|
|
|
extensions.forEach((ext) => {
|
|
const old = require.extensions[ext];
|
|
|
|
require.extensions[ext] = (m, path) => {
|
|
const _compile = (m as any)._compile;
|
|
|
|
(m as any)._compile = (code, path) => {
|
|
console.error(code);
|
|
return _compile.call(this, code, path);
|
|
};
|
|
|
|
return old(m, path);
|
|
};
|
|
});
|