waku processes .test.ts
files during development, causing issues with bun:test
#1264
Labels
help wanted
Extra attention is needed
Description
While using
waku
withbun
, I noticed that.test.ts
files are being processed when runningbun run dev
. This leads to an error if the test files usebun:test
, as Vite attempts to resolve it during import analysis.However, test files are typically not needed during runtime and should not be loaded in the first place. This behavior suggests that
vite
is unintentionally including.test.ts
files when resolving dependencies.This is not a critical issue, as switching from
bun:test
tovitest
resolves the problem. I wanted to share this behavior in case it is unintended and might be worth addressing.Steps to Reproduce
waku
+bun
project, create a test file (e.g.,sample.test.ts
):Expected Behavior
.test.ts
files should not be processed during development server startup, as they are only needed in test environments.vite
should not attempt to resolvebun:test
during theimport-analysis
phase.Possible Causes
vite
'soptimizeDeps.entries
might be unintentionally including.test.ts
files.processModule
function indev-server-impl.js
could be processing.test.ts
files when it shouldn't.willBeHandled
logic might not be properly filtering out.test.ts
files.Additional Notes
vitest
instead ofbun:test
resolved the issue, so this is not blocking my work.Let me know if you need any more details. Thanks!
The text was updated successfully, but these errors were encountered: