diff --git a/packages/plugin-vue/src/main.ts b/packages/plugin-vue/src/main.ts index 31be19ee..d1996b08 100644 --- a/packages/plugin-vue/src/main.ts +++ b/packages/plugin-vue/src/main.ts @@ -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