Last 12 weeks · 0 commits
3 of 6 standards met
Repository: solidjs/vite-plugin-solid. Description: A simple integration to run solid-js with vite Stars: 496, Forks: 60. Primary language: TypeScript. Languages: TypeScript (93.7%), JavaScript (4.9%), HTML (1.1%), MDX (0.3%). Latest release: vite-plugin-solid@2.11.10 (4mo ago). Open PRs: 8, open issues: 39. Last activity: 7m ago. Community health: 62%. Top contributors: amoutonbrady, ryansolid, birkskyum, lxsmnsyc, dependabot[bot], github-actions[bot], alexandre-mb-airweb, bluwy, high1, nksaraf and others.
Description Vitest has a workspaces feature, where vitest can be made aware of different sub-projects, and run the tests for each of these workspaces (based on their individual configuration) together. However, when using Vitest workspaces _and_ , the resolution system fails to work properly, and functions like throw errors. Reproduction https://stackblitz.com/edit/solidjs-templates-4usktg?file=README.md&view=editor The problem can be reproduced by running in the console. This runs a test that just calls . Running runs vitest in the package, which bypasses Vitest's workspaces system, everything works again. Running runs vitest the same as in , but with the plugin disabled. Again, this works as expected. Error/Investigation The error returned is: This is because in dev-mode, the tries to access the object exported by . This object is only available if is running in dev mode (in production, a different file is used which sets to undefined). However, for some reason, when Vite/NodeJS/Vitest/? tries to resolve the import from , it instead imports the production version of , which obviously doesn't have the correct exported object, and so an error is thrown. I'm creating this issue here, because the error only occurs if is installed, but I'm not entirely sure what this plugin is doing that makes things behave weirdly here. There isn't any JSX to process, so I would have through the plugin is essentially a no-op. Thanks for any help!