Vue router mode 'hash' issue in dev
-
We are heavily using NGINX and sockets to chain several computers, some of which are behind NAT. To get this all to work, we recently had to change our Vue Router Mode from
history
tohash
. We’re seeing 1 issue when you executequasar dev
and the web page automatically appears. The browser URL becomes this:
localhost/index.html#/
When it should just be this:
localhost/#/
The first instance gives us all kinds of errors becauselocation.path
becomes incorrect for NGINX usage. As I said, this is only an issue in dev mode when the browser automatically starts.Does anyone know where this is initiated?
-
Instead of changing quasar sources, I have just done the following in my client start up:
if (process.env.NODE_ENV !== 'production') { if (location.href.indexOf('index.html') > -1) { let redirectPath = location.href.replace('index.html', '') window.location = redirectPath return } }