File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ global.angularCliPackages = require('./packages');
1212const compilerOptions = JSON . parse ( fs . readFileSync ( path . join ( __dirname , '../tsconfig.json' ) ) ) ;
1313
1414const oldRequireTs = require . extensions [ '.ts' ] ;
15- require . extensions [ '.ts' ] = function ( m , filename ) {
15+ require . extensions [ '.ts' ] = function ( m , filename ) {
1616 // If we're in node module, either call the old hook or simply compile the
1717 // file without transpilation. We do not touch node_modules/**.
1818 // We do touch `Angular CLI` files anywhere though.
@@ -52,6 +52,9 @@ if (!__dirname.match(new RegExp(`\\${path.sep}node_modules\\${path.sep}`))) {
5252 const Module = require ( 'module' ) ;
5353 const oldLoad = Module . _load ;
5454 Module . _load = function ( request , parent ) {
55+ if ( request . match ( / t s - n o d e / ) && parent && parent . id && parent . id . match ( / k a r m a / ) ) {
56+ throw new Error ( ) ;
57+ }
5558 if ( request in packages ) {
5659 return oldLoad . call ( this , packages [ request ] . main , parent ) ;
5760 } else if ( request . startsWith ( '@angular/cli/' ) ) {
You can’t perform that action at this time.
0 commit comments