Skip to content

Commit

Permalink
fix: improve resolve alias with ~ (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey authored May 28, 2024
1 parent 07e2573 commit 5f73701
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rude-roses-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marko/vite": patch
---

Update ~ resolve alias to avoid matching ~ by itself as the package name.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export default function markoPlugin(opts: Options = {}): vite.Plugin[] {
resolve: {
alias: [
{
find: /^~/,
find: /^~(?!\/)/,
replacement: "",
},
],
Expand Down

0 comments on commit 5f73701

Please sign in to comment.