File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
compiler-core/src/transforms Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,12 @@ export function resolveComponentType(
244244 return builtIn
245245 }
246246
247- // 3. user component (resolve)
247+ // 3. user component (from setup bindings)
248+ if ( context . bindingMetadata [ tag ] === 'setup' ) {
249+ return `$setup[${ JSON . stringify ( tag ) } ]`
250+ }
251+
252+ // 4. user component (resolve)
248253 context . helper ( RESOLVE_COMPONENT )
249254 context . components . add ( tag )
250255 return toValidAssetId ( tag , `component` )
Original file line number Diff line number Diff line change @@ -10,7 +10,12 @@ export const compilerOptions: CompilerOptions = reactive({
1010 hoistStatic : false ,
1111 cacheHandlers : false ,
1212 scopeId : null ,
13- ssrCssVars : `{ color }`
13+ ssrCssVars : `{ color }` ,
14+ bindingMetadata : {
15+ TestComponent : 'setup' ,
16+ foo : 'setup' ,
17+ bar : 'props'
18+ }
1419} )
1520
1621const App = {
You can’t perform that action at this time.
0 commit comments