mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-21 21:25:11 +00:00
fix: ensure importer is normalised before resolving relative imports
This commit is contained in:
parent
6133fe62d6
commit
1a375d638c
@ -43,6 +43,9 @@ export const VirtualFSPlugin = (nuxt = useNuxt(), options: VirtualFSPluginOption
|
||||
}
|
||||
|
||||
if (importer && !isAbsolute(id)) {
|
||||
if (importer.startsWith(PREFIX)) {
|
||||
importer = importer.slice(PREFIX.length)
|
||||
}
|
||||
const resolved = resolveWithExt(join(dirname(importer), id))
|
||||
if (resolved) {
|
||||
return PREFIX + resolved
|
||||
|
Loading…
Reference in New Issue
Block a user