corvudev / corvu

🐦‍⬛ Unstyled, accessible and customizable UI primitives for SolidJS

Home Page:https://corvu.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Unknown file extension /utils/dist/reactivity/index.jsx in solid-presence #645

z3phyro opened this issue · comments

Bug description

When running tests on a component made with Kobalte there is the following error

image

I could find out that it's related with the solid-presence package. The access to the main module is through a js file, but then it references jsx files. I was tinkering with it a bit and when changing the entry point to a jsx files it works for the test but not for the build or npm run dev and viceversa.

I've also noticed similar issue in solid-prevent-scroll package and the router package.

attached an image and the stackblitz example

Reproduction Link

https://stackblitz.com/edit/github-xfdh2g-4fkfdg?file=package.json

Reproduction Steps

  1. Install kobalte.
  2. Create a test based on a kobalte component
  3. Run the tests

Expected behavior

Tests should work without problem

Additional context

No response

Hey! Thanks for reporting this.
It seems like vitest tries to import packages over the solid export, even if the import happens inside a .js file, which is odd. To fix this on my side, I added solid exports for the solid-presence and solid-prevent-scroll package. Make sure to update these packages to their latest version and the test should work :)

Fixed versions:
solid-presence@0.1.7
solid-prevent-scroll@0.1.8

Fixed repro with updated dependencies

Awesome 🤩 ! Thank you so much.
I forgot to say before, congrats for such a good job with Corvu. Keep it up 🦾

Thank you very much! 😊
It's always motivating to hear such kind words 💜 🐦‍⬛