Skip to content

Commit 76b1448

Browse files
authored
fix: HMR not working correctly with vue-class-component components (#1897)
1 parent 9e47e8e commit 76b1448

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/exportHelper.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// runtime helper for setting properties on components
22
// in a tree-shakable way
33
export default (sfc: any, props: [string, string][]) => {
4+
const target = sfc.__vccOpts || sfc
45
for (const [key, val] of props) {
5-
sfc[key] = val
6+
target[key] = val
67
}
7-
return sfc
8+
return target
89
}

0 commit comments

Comments
 (0)