Skip to content

Commit bb7da3f

Browse files
committedJan 30, 2021
fix(plugin-vue): handle block src pointing to dependency files
close #1812
1 parent 59fe913 commit bb7da3f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎packages/plugin-vue/src/main.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,9 @@ async function linkSrcToDescriptor(
349349
) {
350350
const srcFile =
351351
(await pluginContext.resolve(src, descriptor.filename))?.id || src
352-
setDescriptor(srcFile, descriptor)
352+
// #1812 if the src points to a dep file, the resolved id may contain a
353+
// version query.
354+
setDescriptor(srcFile.replace(/\?.*$/, ''), descriptor)
353355
}
354356

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

0 commit comments

Comments
 (0)
Please sign in to comment.