Menci / Menci/vite-plugin-wasm

vite.config 中配置 base 为 相对路径 './' 构建后无法加载到wasm,报错Failed to construct 'URL': Invalid URL

Open
#68 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
431
Forks
27
PR merge metrics
No merged PRs in 30d

Description

vite中配置base路径为相对路径

plugins: [preset(mode), wasm(), topLevelAwait()],
base:'./',  

构建后报错

Image

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the build with the shown vite.config settings: base './', preset(mode), wasm(), and topLevelAwait(). Inspect the built output and the reported Invalid URL failure; done means the generated application can load its WebAssembly module when served from the built files.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.