mediainfo.js icon indicating copy to clipboard operation
mediainfo.js copied to clipboard

Build time warning when used with Vite

Open AFCMS opened this issue 4 months ago • 1 comments

Checklist

  • [x] I have searched the issue tracker for any duplicate issues and confirmed that this bug has not been reported before.
  • [x] I have tested the issue with the upstream project MediaInfo and can confirm that the problem only exists in mediainfo.js.
  • [x] I have attached all necessary test files, if applicable, so that the issue can be easily reproduced by the developers.
  • [x] I have added a reproduction repository or a code sandbox that clearly illustrates the issue. Providing a minimal example will greatly help the developers in understanding and resolving the problem.

Bug Description

When building the official Vite example (or any projects built on this template) you get this warning:

new URL('MediaInfoModule.wasm', import.meta.url) doesn't exist at build time, it will remain unchanged to be resolved at runtime. If this is intended, you can use the /* @vite-ignore */ comment to suppress this warning.

Steps to Reproduce

  1. cd examples/vite-react
  2. pnpm install
  3. pnpm run build

Expected Behavior

The build should run without warning.

Actual Behavior

Warning in console

Environment

  • mediainfo.js version: main
  • Operating System: Fedora 42
  • Browser (if applicable): Chrome
  • Node.js (if applicable): 22

Additional Information

Tested both on Vite 6 (example) and Vite 7 (own project).

Warning as such are monitored by tools like Vercel which then displays danger signs on deployment.

AFCMS avatar Oct 16 '25 15:10 AFCMS