Menci / Menci/vite-plugin-wasm
Plugin always bundles Wasm as base64 when vitest is installed
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 431
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
I have a Vite app, and I have Vitest installed. When I run vite build, my Wasm file is bundled as base64, even though I want it to be bundled as a URL. This line of code seems to be the problem:
I guess the config plugins includes vitest even when I'm not using it?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/index.ts#L16 and inspect how the plugin config identifies Vitest when running a Vite build. Reproduce the issue with a Vite app that has Vitest installed and run vite build; done means the Wasm asset is emitted as a URL rather than bundled as base64.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vite, wasm
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100