From abe72f843e4792d7bdefda40c946ec9752adb0b2 Mon Sep 17 00:00:00 2001 From: Artur Tagisow Date: Sun, 12 Jul 2020 18:46:12 +0200 Subject: [PATCH] Fix @/abc being treated as scoped module Fixes #1851 Before this commit, @/abc was being wrongly detected as a scoped module. This was a problem when somebody had a webpack alias `@`. (eg. @ -> ./src) In general, scoped modules can't start with @/, I think they have to be like @/abcd. --- src/core/importType.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/importType.js b/src/core/importType.js index ff2d10b60f..25ab2bdced 100644 --- a/src/core/importType.js +++ b/src/core/importType.js @@ -93,7 +93,7 @@ function typeTest(name, settings, path) { } export function isScopedModule(name) { - return name.indexOf('@') === 0 + return name.indexOf('@') === 0 && !name.startsWith('@/') } export default function resolveImportType(name, context) {