You would need to update the target domain to return appropriate CORS headers, allowing your resource domain, there's nothing you can do from the client. If you don't control the resource domain, you will need to setup a reverse proxy.
I've generally used Caddy in a Docker container to serve static app resources and revere proxy an /api route as needed. Most web frameworks will have the option to do the same for while you're in watch/dev mode.