the all funciton of routing vue.js project is working well in local test.
However, this.$router.push method doesn't work when testing nginx server.
The nginx server has the proper configuration to route client-side rendering
/etc/nginx/nginx.conf
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^(.+)$ /index.html last;
}
It's very wired that this.$router.push doesn't work only.
The beforeEach method and direct link function properly.
Do you have the same experience about that and know any solution?
- logging before and after this.$router.push
this.$router.push must be called and the error doesn't be throwned.
- changing /etc/nginx/nginx.conf
I tried the serveral type of nginx.conf to forward index.html.
rewrites or others. It works well. However, this.$router.push only doesn't work.