File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
import { virtualFs } from '@angular-devkit/core' ;
9
- import { readFileSync , readdirSync } from 'fs' ;
9
+ import { readFileSync , readdirSync , statSync } from 'fs' ;
10
10
import { dirname , join } from 'path' ;
11
11
import * as ts from 'typescript' ;
12
12
import { WebpackCompilerHost } from '../compiler_host' ;
@@ -126,7 +126,8 @@ function loadTypeScriptLibFiles(): Record<string, string> {
126
126
127
127
function loadTsLibFiles ( ) : Record < string , string > {
128
128
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 ( ) ) ;
130
131
131
132
// Return a map of the lib names to their content.
132
133
const libs : Record < string , string > = { } ;
You can’t perform that action at this time.
0 commit comments