qwik-ui
qwik-ui copied to clipboard
[🐞] Multiple Select components in a single page has odd behaviours in an AstroJS project
Which package is affected?
Headless Kit
Describe the bug
Using multiple Select components in a single page causes all selects to trigger the first one on the page.
Reproduction
https://github.com/jaredlll08/qwik-ui-astro-issues
Steps to reproduce
npm i npm run dev
System Info
System:
OS: Windows 11 10.0.22631
CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
Memory: 32.56 GB / 63.18 GB
Binaries:
Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.2.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.7.6 - ~\AppData\Local\pnpm\pnpm.EXE
Browsers:
Chrome: 129.0.6668.70
Edge: Chromium (122.0.2365.66)
Internet Explorer: 11.0.22621.3527
Additional Information
From discussion on the discord: https://discord.com/channels/990511757091033108/1040763063533588562/1289196607853822073
Jack Shelton — Today at 06:07
This is what I thought would be the case. Darn :/ . The problem is in the Qwik Astro integration.
Basically the Qwik Astro integration currently scans your project for entrypoints, when adding libs that means into the node modules, and it seems some of these entrypoint files can't be found.
Ideally, this information should just be grabbed from qwikVite itself. I've been looking into this recently (e.g. last night), but it's not a super easy problem. Will try my best to fix it :cat_salute:
So the TLDR is Qwik City does this correctly but the Qwik Astro integration doesn't. The Qwik Vite plugin needs to be refactored to handle this case.