File tree 2 files changed +8
-2
lines changed
packages/@ngtools/webpack/src
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ export class PathsPlugin implements Tapable {
96
96
aliasPattern = new RegExp ( `^${ excapedAlias } $` ) ;
97
97
} else {
98
98
let withStarCapturing = excapedAlias . replace ( '\\*' , '(.*)' ) ;
99
- aliasPattern = new RegExp ( `^${ withStarCapturing } ` ) ;
99
+ aliasPattern = withStarCapturing === '(.*)' ?
100
+ new RegExp ( excapedAlias ) : new RegExp ( `^${ withStarCapturing } ` ) ;
100
101
}
101
102
102
103
this . mappings . push ( {
@@ -163,7 +164,7 @@ export class PathsPlugin implements Tapable {
163
164
}
164
165
165
166
createPlugin ( resolver : ResolverPlugin , mapping : any ) : any {
166
- return ( request : any , callback : Callback < any > ) => {
167
+ return ( request : Request , callback : Callback < any > ) => {
167
168
try {
168
169
this . resolve ( resolver , mapping , request , callback ) ;
169
170
} catch ( err ) {
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ export default function() {
13
13
] ,
14
14
'@shared/*' : [
15
15
'app/shared/*'
16
+ ] ,
17
+ '*' : [
18
+ 'app/shared/*'
16
19
]
17
20
} ;
18
21
} )
@@ -25,12 +28,14 @@ export default function() {
25
28
import { meaning } from 'app/shared/meaning';
26
29
import { meaning as meaning2 } from '@shared';
27
30
import { meaning as meaning3 } from '@shared/meaning';
31
+ import { meaning as meaning4 } from 'meaning';
28
32
29
33
// need to use imports otherwise they are ignored and
30
34
// no error is outputted, even if baseUrl/paths don't work
31
35
console.log(meaning)
32
36
console.log(meaning2)
33
37
console.log(meaning3)
38
+ console.log(meaning4)
34
39
` ) )
35
40
. then ( ( ) => ng ( 'build' ) ) ;
36
41
}
You can’t perform that action at this time.
0 commit comments