Closed excursus closed 1 year ago
Thanks for reporting the problem. It is fixed in Wallaby core v1.0.1400
.
The cause was that solid.js
uses conditional exports and the vite-solid-plugin
sets these with vite's resolve.conditions
and also requires the use of vitest node loader.
Wallaby has its own ESM node loader and so the vitest loader was being ignored in your scenario, resulting in the difference in behavior that you saw. We have updated Wallaby to chain the vitest node loader when it is configured to be used.
Issue description or question
I've created a minimally reproducible repo of my example, which you can find here. The repo has only one test file containing one test. The test runs fine from the command line, but when run through wallaby in vscode it errors out with the message:
TypeError: DEV$1.hashValue is not a function
.While digging around, I found that running the test from the command line causes vitest to import
node_modules/solid-js/web/dist/server.cjs
but while running from wallaby, it importsnode_modules/solid-js/web/dist/dev.js
, which might be the source of the disconnect.Wallaby diagnostics report