File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -182,21 +182,18 @@ export class Vue<Props = unknown>
182
182
}
183
183
184
184
// from Vue Loader
185
- if ( Ctor . render ) {
186
- options . render = Ctor . render
187
- }
188
-
189
- if ( Ctor . __file ) {
190
- options . __file = Ctor . __file
191
- }
192
-
193
- if ( Ctor . __cssModules ) {
194
- options . __cssModules = Ctor . __cssModules
195
- }
196
-
197
- if ( Ctor . __scopeId ) {
198
- options . __scopeId = Ctor . __scopeId
199
- }
185
+ const injections = [
186
+ 'render' ,
187
+ '__file' ,
188
+ '__cssModules' ,
189
+ '__scopeId' ,
190
+ '__hmrId' ,
191
+ ] as const
192
+ injections . forEach ( ( key ) => {
193
+ if ( Ctor [ key ] ) {
194
+ options [ key ] = Ctor [ key ]
195
+ }
196
+ } )
200
197
201
198
return options
202
199
}
@@ -243,6 +240,7 @@ export class Vue<Props = unknown>
243
240
static __file ?: string
244
241
static __cssModules ?: Record < string , any >
245
242
static __scopeId ?: string
243
+ static __hmrId ?: string
246
244
247
245
constructor ( props : Props , ctx : SetupContext ) {
248
246
defineGetter ( this , '$props' , ( ) => props )
You can’t perform that action at this time.
0 commit comments