You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to get this to work by adding { root: '.' } in previewServer.mjs to the createServer call
Describe the bug
Hot reload doesn't work if the 'root' option is configured to something other than the default in vite.config.ts.
Reproduce
Take the example project, change the 'root' field in vite.config.ts to something else (like "test-root"). Change the 'root' field to '.' in the test.root option so that tests still work. Run vitest-preview and run a test.
Potential solution
I was able to get this to work by adding { root: '.' } in previewServer.mjs to the createServer call
Describe the bug
Hot reload doesn't work if the 'root' option is configured to something other than the default in vite.config.ts.
Reproduce
Take the example project, change the 'root' field in vite.config.ts to something else (like "test-root"). Change the 'root' field to '.' in the test.root option so that tests still work. Run vitest-preview and run a test.
https://stackblitz.com/edit/vitest-preview-9hat82?file=src%2FApp.test.tsx
Expected behavior
vitest-preview should hot reload, but it doesn't. You only see the results after a refresh.
The text was updated successfully, but these errors were encountered: