Repository navigation
Commit 502c867
committed
fix(compiler): use original imported name for dollar-hook signal site check in .tsrx
When a dollar-suffixed custom hook is aliased (e.g. `import { useUser$ as
useUser }`), the .tsrx compilation path in compile.js was passing the local
alias to customHookSignalSite instead of the original imported name. This
caused the `name.endsWith('$')` check to fail, preventing h: site emission
and collapsing distinct call sites onto one instance cell.
The slot-hooks.js (plain .ts) path correctly used `node._octaneCustomHookCall`
which carries the original imported name. Apply the same approach in compile.js
by reading `n._octaneCustomHookCall` (stamped during annotation) with a
fallback to localName for non-imported hooks.1 parent 05aa67c commit 502c867
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20181 | 20181 | | |
20182 | 20182 | | |
20183 | 20183 | | |
20184 | | - | |
| 20184 | + | |
20185 | 20185 | | |
20186 | 20186 | | |
20187 | 20187 | | |
| |||
0 commit comments