Skip to content

Commit c2be8a5

Browse files
committed
fix(config): fix alias path on windows
1 parent 1425ce0 commit c2be8a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/models/Config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ var Config = function () {
180180
(0, _keys2.default)(alias).map(function (key) {
181181
var isRelativePath = alias[key].indexOf(USER_HOME) === -1 && alias[key].indexOf(process.cwd()) === -1;
182182
if (key.indexOf('$') !== key.length - 1 && /^\/.+/.test(alias[key]) && isRelativePath) {
183-
alias[key] = sysPath.join(_this2._config.cwd, alias[key]);
183+
alias[key] = normalize(sysPath.join(_this2._config.cwd, alias[key]));
184184
}
185185
});
186186
extend(true, this._config.resolve.alias, alias);

src/models/Config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class Config {
161161
&& /^\/.+/.test(alias[key])
162162
&& isRelativePath
163163
) {
164-
alias[key] = sysPath.join(this._config.cwd, alias[key]);
164+
alias[key] = normalize(sysPath.join(this._config.cwd, alias[key]));
165165
}
166166
});
167167
extend(true, this._config.resolve.alias, alias);

0 commit comments

Comments
 (0)