Making a Chip8 interpreter with React using Vite and I’m having issues with using Fetch API for the ROM files

I’m making a small React project that’s a Chip8 interpreter, and I’m confused about how to properly retrieve the ROM files using the Fetch API.

The App.jsx component
enter image description here

The RomBuffer.js class
enter image description here

The project’s file structure. I previously had the roms folder in the Public directory in the root before placing it in the src directory.

enter image description here

The Vite.config.js file

enter image description here

Regardless of the path I use for the URL object in the test method, I don’t get the correct data for the given ROM file in the fetch response on line 30 of RomBuffer.js. When I had the roms folder in the public directory, I would get an HTTP 200 response from on line 30 with the Blob and ArrayBuffer objects having lengths of 0.

Currently, with the roms folder being in src, I’m getting this error:
enter image description here