File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ var Config = function () {
157
157
( function ( ) {
158
158
var alias = nextConfig . resolve . alias ;
159
159
Object . keys ( alias ) . map ( function ( key ) {
160
- if ( key . indexOf ( '$' ) !== key . length - 1 && / ^ \/ .+ / . test ( alias [ key ] ) ) {
160
+ if ( key . indexOf ( '$' ) !== key . length - 1 && / ^ \/ .+ / . test ( alias [ key ] ) && alias [ key ] . indexOf ( _this2 . _config . cwd ) === - 1 ) {
161
161
alias [ key ] = sysPath . join ( _this2 . _config . cwd , alias [ key ] ) ;
162
162
}
163
163
} ) ;
Original file line number Diff line number Diff line change @@ -143,7 +143,10 @@ class Config {
143
143
if ( nextConfig . resolve && nextConfig . resolve . alias ) {
144
144
let alias = nextConfig . resolve . alias ;
145
145
Object . keys ( alias ) . map ( ( key ) => {
146
- if ( key . indexOf ( '$' ) !== key . length - 1 && / ^ \/ .+ / . test ( alias [ key ] ) ) {
146
+ if ( key . indexOf ( '$' ) !== key . length - 1
147
+ && / ^ \/ .+ / . test ( alias [ key ] )
148
+ && alias [ key ] . indexOf ( this . _config . cwd ) === - 1
149
+ ) {
147
150
alias [ key ] = sysPath . join ( this . _config . cwd , alias [ key ] ) ;
148
151
}
149
152
} ) ;
You can’t perform that action at this time.
0 commit comments