Skip to content

Commit

Permalink
fix(plugin-vue): handle block src pointing to dependency files
Browse files Browse the repository at this point in the history
close #1812
  • Loading branch information
yyx990803 committed Jan 30, 2021
1 parent d18b6de commit 31863d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/plugin-vue/src/main.ts
Expand Up @@ -349,7 +349,9 @@ async function linkSrcToDescriptor(
) {
const srcFile =
(await pluginContext.resolve(src, descriptor.filename))?.id || src
setDescriptor(srcFile, descriptor)
// #1812 if the src points to a dep file, the resolved id may contain a
// version query.
setDescriptor(srcFile.replace(/\?.*$/, ''), descriptor)
}

// these are built-in query parameters so should be ignored
Expand Down

0 comments on commit 31863d1

Please sign in to comment.