squint-cljs / vite-plugin-squint

A plugin to compile .cljs source code with squint using vite
1 stars 3 forks source link

Demo - Vite + Squint + Qwik #12

Closed brandonstubbs closed 4 months ago

brandonstubbs commented 5 months ago

This is the ported vite qwik template

Same issues with JSX transformation as solid https://github.com/squint-cljs/vite-plugin-squint/pull/11

cc @martinklepsch

brandonstubbs commented 4 months ago

We would require support for Qwiks $ optimisations: https://github.com/squint-cljs/squint/issues/498

brandonstubbs commented 4 months ago

Can confirm https://github.com/squint-cljs/squint/issues/499 does correctly emit the arrow functions.

But we still run into this issue: https://github.com/squint-cljs/squint/issues/501

The following does not work in Qwik, it fails with the extra paren:

<button onClick$={(() => count.value++)}>count is {count.value}</button>

This works:

<button onClick$={() => count.value++}>count is {count.value}</button>

I guess this is more an issue their side as mentioned in issue 501 @borkdude ?

borkdude commented 4 months ago

I can check if omitting the extra param is possible

borkdude commented 4 months ago

Try 0.7.104

borkdude commented 4 months ago

Seems to work now:

https://squint-cljs.github.io/squint/?src=OzsgPGJ1dHRvbiBvbkNsaWNrJD17KCgpID0%2BIGNvdW50LnZhbHVlKyspfT5jb3VudCBpcyB7Y291bnQudmFsdWV9PC9idXR0b24%2BCgooZGVmY2xhc3MgRm9vCiAgKGZpZWxkIGNvdW50KQogIChjb25zdHJ1Y3RvciBbdGhpc10pCiAgT2JqZWN0CiAgKHJlbmRlciBbX10KICAgICNodG1sIFs6YnV0dG9uIHs6b25DbGljayQgKF46PT4gZm4gW10gKHNldCEgY291bnQgKGluYyBjb3VudCkpKX1dKSk%3D

brandonstubbs commented 4 months ago

Yes great thanks that works now!