From eee45396d17ee6867913cf170d8aa95334bfd6c7 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 14 Jun 2021 20:23:21 +0200 Subject: [PATCH] fix(kit): ignore @ alias without following slash (resolves #210) --- packages/kit/src/utils/resolve.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/kit/src/utils/resolve.ts b/packages/kit/src/utils/resolve.ts index d39688df11..a38baea35e 100644 --- a/packages/kit/src/utils/resolve.ts +++ b/packages/kit/src/utils/resolve.ts @@ -77,6 +77,7 @@ function resolvePath (path: string, opts: ResolveOptions = {}) { */ export function resolveAlias (path: string, alias: ResolveOptions['alias']) { for (const key in alias) { + if (key === '@') { continue } // Don't resolve @foo/bar if (path.startsWith(key)) { path = alias[key] + path.substr(key.length) }