Skip to content

Getting SolidJS to work with a vitest workspace structure #6537

Answered by hi-ogawa
MrJohz asked this question in Q&A
Discussion options

You must be logged in to vote
  • Where can I see/debug how an import is being resolved by Vitest?

The first thing I tried is to run Vitest with VITE_NODE_DEBUG_DUMP=1. This will dump Vitest/Vite's transform, so you can see how import is rewritten. For example, I can see solid-js/store became .../node_modules/solid-js/store/dist/dev.js https://stackblitz.com/edit/solidjs-templates-em2dzk?file=debug-vite-node-frontend%2F_home_projects_solidjs-templates-zxnf4p_frontend_test_spec_ts--1534932233.js

Looking at this, the transform seems same, so the next thing I suspected is NodeJS import condition and indeed it looks like there's a difference if you print process.execArgv https://stackblitz.com/edit/solidjs-templates-em2dz…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MrJohz
Comment options

Answer selected by MrJohz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants