@@ -232,18 +232,6 @@ export function client_component(source, analysis, options) {
232
232
group_binding_declarations . push ( b . const ( group . name , b . array ( [ ] ) ) ) ;
233
233
}
234
234
235
- // Bind static exports to props so that people can access them with bind:x
236
- const static_bindings = analysis . exports . map ( ( { name, alias } ) => {
237
- return b . stmt (
238
- b . call (
239
- '$.bind_prop' ,
240
- b . id ( '$$props' ) ,
241
- b . literal ( alias ?? name ) ,
242
- serialize_get_binding ( b . id ( name ) , instance_state )
243
- )
244
- ) ;
245
- } ) ;
246
-
247
235
const component_returned_object = analysis . exports . map ( ( { name, alias } ) => {
248
236
const expression = serialize_get_binding ( b . id ( name ) , instance_state ) ;
249
237
@@ -369,10 +357,25 @@ export function client_component(source, analysis, options) {
369
357
...group_binding_declarations ,
370
358
.../** @type {import('estree').Statement[] } */ ( instance . body ) ,
371
359
analysis . runes ? b . empty : b . stmt ( b . call ( '$.init' ) ) ,
372
- .../** @type {import('estree').Statement[] } */ ( template . body ) ,
373
- ...static_bindings
360
+ .../** @type {import('estree').Statement[] } */ ( template . body )
374
361
] ) ;
375
362
363
+ if ( ! analysis . runes ) {
364
+ // Bind static exports to props so that people can access them with bind:x
365
+ for ( const { name, alias } of analysis . exports ) {
366
+ component_block . body . push (
367
+ b . stmt (
368
+ b . call (
369
+ '$.bind_prop' ,
370
+ b . id ( '$$props' ) ,
371
+ b . literal ( alias ?? name ) ,
372
+ serialize_get_binding ( b . id ( name ) , instance_state )
373
+ )
374
+ )
375
+ ) ;
376
+ }
377
+ }
378
+
376
379
const append_styles =
377
380
analysis . inject_styles && analysis . css . ast
378
381
? ( ) =>
0 commit comments