Problem to change from “mode: hash” to “mode: history”

Solution for Problem to change from “mode: hash” to “mode: history”
is Given Below:

I’m having a problem to use vue-router in “history-mode”.

My local server is running on localhost:8080, so my app.js are fetching from http://localhost:8080/app.js when it’s running in “hash-mode”, but when I changed it to “history-mode” my app.js start to be fetching from http://localhost:8080/profile/app.js.

/profile/ is the first part of the URL that my app opens…

I’m running through the same issue with my favicon icon, that are in public/img and uses the base_url (href="<%= BASE_URL %>favicon.ico") in index.html to be fetched.

Somebody already pass through the same issue and/or could help me?