File tree 1 file changed +4
-11
lines changed
1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -31,19 +31,12 @@ module.exports = class AliasPlugin {
31
31
*/
32
32
apply ( resolver ) {
33
33
const target = resolver . ensureHook ( this . target ) ;
34
- const cache = { } ;
35
34
const getAbsolutePathWithSlashEnding = maybeAbsolutePath => {
36
- if ( cache [ maybeAbsolutePath ] === undefined ) {
37
- const type = getType ( maybeAbsolutePath ) ;
38
- if ( type === PathType . AbsolutePosix || type === PathType . AbsoluteWin ) {
39
- cache [ maybeAbsolutePath ] = resolver
40
- . join ( maybeAbsolutePath , "_" )
41
- . slice ( 0 , - 1 ) ;
42
- } else {
43
- cache [ maybeAbsolutePath ] = null ;
44
- }
35
+ const type = getType ( maybeAbsolutePath ) ;
36
+ if ( type === PathType . AbsolutePosix || type === PathType . AbsoluteWin ) {
37
+ return resolver . join ( maybeAbsolutePath , "_" ) . slice ( 0 , - 1 ) ;
45
38
}
46
- return cache [ maybeAbsolutePath ] ;
39
+ return null ;
47
40
} ;
48
41
const isSubPath = ( path , maybeSubPath ) => {
49
42
const absolutePath = getAbsolutePathWithSlashEnding ( maybeSubPath ) ;
You can’t perform that action at this time.
0 commit comments