Skip to content

Commit

Permalink
Fix @/abc being treated as scoped module
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Artur Tagisow committed Jul 12, 2020
1 parent 843055c commit abe72f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/importType.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit abe72f8

Please sign in to comment.