build.assetsInlineLimit defaults to 4096 bytes. Any imported asset smaller than that is emitted as a base64 data URI in the JavaScript instead of a separate file with a hashed name. It saves a request, and it breaks code that assumes the import yields a fetchable URL.
The failure cases are specific: passing the value to new URL() or to code that does a fetch on it, SVGs handed to a library that reads them by path, and web worker or audio sources that must be real files. The same import works in dev, where assets are always served as URLs, and only breaks in the built output.
Override per file with the ?url query suffix, which always produces a URL, or ?inline, which always inlines. Set the limit to 0 to disable inlining entirely for the project. Note that assets referenced from publicDir are never processed at all: they are copied verbatim without hashing, so they are the right place for files whose exact name must be stable, and the wrong place for anything needing cache busting.