Skip to content

Commit

Permalink
fix: alias incorrect on windows (#639)
Browse files Browse the repository at this point in the history
* fix: alias incorrect on windows

* chore: version and changelog

---------

Co-authored-by: luhc228 <[email protected]>
  • Loading branch information
chisdiva and luhc228 authored Mar 7, 2024
1 parent 49f2002 commit 65aaa99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/pkg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.5.20

### Patch Changes

- fix: alias path is incorrect on windows system

## 1.5.19

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/pkg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ice/pkg",
"version": "1.5.19",
"version": "1.5.20",
"description": "A fast builder for React components, Node modules and web libraries.",
"type": "module",
"main": "./lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/pkg/src/rollupPlugins/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function resolveAliasConfig(alias: Record<string, string>, rootDir: strin
const target = alias[pattern];
newAlias[pattern] = target[0] === '.' ?
// transform alias relative target to relative to the rootDir
path.relative(path.dirname(filePath), path.resolve(rootDir, target)) || '.' :
path.relative(path.dirname(filePath), path.resolve(rootDir, target)).split(path.sep).join('/') || '.' :
target;
});

Expand Down

0 comments on commit 65aaa99

Please sign in to comment.