File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.io/license
77 */
88import { virtualFs } from '@angular-devkit/core' ;
9- import { readFileSync , readdirSync } from 'fs' ;
9+ import { readFileSync , readdirSync , statSync } from 'fs' ;
1010import { dirname , join } from 'path' ;
1111import * as ts from 'typescript' ;
1212import { WebpackCompilerHost } from '../compiler_host' ;
@@ -126,7 +126,8 @@ function loadTypeScriptLibFiles(): Record<string, string> {
126126
127127function loadTsLibFiles ( ) : Record < string , string > {
128128 const libFolderPath = dirname ( require . resolve ( 'tslib/package.json' ) ) ;
129- const libFolderFiles = readdirSync ( libFolderPath ) ;
129+ const libFolderFiles = readdirSync ( libFolderPath )
130+ . filter ( p => statSync ( join ( libFolderPath , p ) ) . isFile ( ) ) ;
130131
131132 // Return a map of the lib names to their content.
132133 const libs : Record < string , string > = { } ;
You can’t perform that action at this time.
0 commit comments