Can't update inline snapshot in Browser Mode #5263
Labels
feat: browser
Issues and PRs related to the browser runner
p3-minor-bug
An edge case that only affects very specific usage (priority)
Describe the bug
I am reopening an issue for the previously closed issue #2327.
When using vitest in Browser Mode, an error occurs when updating inline snapshots.
I believe this is because:
vite:resolve
is using thebrowser
entry point to resolve dependenciesmagic-string
(this file) is loaded as amodule
@jridgewell/sourcemap-codec
, which has an UMD bundle asbrowser
entry point (see itspackage.json
)Importing an UMD bundle from an ES module doesn't work, hence the error.
Reproduction
Output:
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: