Closed evertbouw closed 1 year ago
I think I should just omit the refresh wrapper in test mode.
The babel plugin always insert the refresh wrapper but inside if (import.meta.hot) {
so it's not executed in test mode.
I currently working on adding a caching option, so maybe the second option is simpler. Should be fixed later today
@ArnaudBarre hey! Could we disable refresh mode but for vitest browser mode? https://vitest.dev/guide/browser.html
Should be the case in the latest version I think. @sheremet-va does config.server.hmr === false
with browser mode?
Should be the case in the latest version I think. @sheremet-va does
config.server.hmr === false
with browser mode?
Yes, it should be disabled unless other plugins enable it.
Trying this plugin in a prototype project and I get
Error: React refresh preamble was not loaded. Something is wrong.
while trying to run vitest. There is no need to have refresh during test ofc so should I just swap for the regular React plugin for test?this does work