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

Lines changed: 3 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy