We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a3c4e7 commit 154440eCopy full SHA for 154440e
packages/plugin-vue/src/handleHotUpdate.ts
@@ -40,9 +40,14 @@ export async function handleHotUpdate(
40
41
if (hasScriptChanged(prevDescriptor, descriptor)) {
42
let scriptModule: ModuleNode | undefined
43
- if (descriptor.script?.lang && !descriptor.script.src) {
+ if (
44
+ (descriptor.scriptSetup?.lang && !descriptor.scriptSetup.src) ||
45
+ (descriptor.script?.lang && !descriptor.script.src)
46
+ ) {
47
const scriptModuleRE = new RegExp(
- `type=script.*&lang\.${descriptor.script.lang}$`
48
+ `type=script.*&lang\.${
49
+ descriptor.scriptSetup?.lang || descriptor.script?.lang
50
+ }$`
51
)
52
scriptModule = modules.find((m) => scriptModuleRE.test(m.url))
53
}
0 commit comments