mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(kit): ignore @ alias without following slash (resolves #210)
This commit is contained in:
parent
c75c03e0bb
commit
eee45396d1
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user