File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ interface ResolutionResult {
2727}
2828
2929class ResolutionContext {
30- private noResolvePaths : RegExp [ ] ;
30+ private noResolvePaths : picomatch . Glob [ ] ;
3131
3232 public diagnostics : ts . Diagnostic [ ] = [ ] ;
3333 public resolvedFiles = new Map < string , ProcessedFile > ( ) ;
@@ -38,9 +38,7 @@ class ResolutionContext {
3838 private readonly emitHost : EmitHost ,
3939 private readonly plugins : Plugin [ ]
4040 ) {
41- const unique = [ ...new Set ( options . noResolvePaths ) ] ;
42- const matchers = unique . map ( x => picomatch . makeRe ( x ) ) ;
43- this . noResolvePaths = matchers ;
41+ this . noResolvePaths = [ ...new Set ( options . noResolvePaths ) ] ;
4442 }
4543
4644 public addAndResolveDependencies ( file : ProcessedFile ) : void {
@@ -73,7 +71,7 @@ class ResolutionContext {
7371 return ;
7472 }
7573
76- if ( this . noResolvePaths . find ( isMatch => picomatch . test ( required . requirePath , isMatch ) ) ) {
74+ if ( this . noResolvePaths . find ( glob => picomatch . isMatch ( required . requirePath , glob ) ) ) {
7775 if ( this . options . tstlVerbose ) {
7876 console . log (
7977 `Skipping module resolution of ${ required . requirePath } as it is in the tsconfig noResolvePaths.`
You can’t perform that action at this time.
0 commit comments