File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ global.angularCliPackages = require('./packages');
12
12
const compilerOptions = JSON . parse ( fs . readFileSync ( path . join ( __dirname , '../tsconfig.json' ) ) ) ;
13
13
14
14
const oldRequireTs = require . extensions [ '.ts' ] ;
15
- require . extensions [ '.ts' ] = function ( m , filename ) {
15
+ require . extensions [ '.ts' ] = function ( m , filename ) {
16
16
// If we're in node module, either call the old hook or simply compile the
17
17
// file without transpilation. We do not touch node_modules/**.
18
18
// We do touch `Angular CLI` files anywhere though.
@@ -52,6 +52,9 @@ if (!__dirname.match(new RegExp(`\\${path.sep}node_modules\\${path.sep}`))) {
52
52
const Module = require ( 'module' ) ;
53
53
const oldLoad = Module . _load ;
54
54
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
+ }
55
58
if ( request in packages ) {
56
59
return oldLoad . call ( this , packages [ request ] . main , parent ) ;
57
60
} else if ( request . startsWith ( '@angular/cli/' ) ) {
You can’t perform that action at this time.
0 commit comments