This may be a known Vue routing thing that I am totally missing.
So I have a .vue file that uses the url /hardware. Here is the routing
{
path: "/hardware",
name: "Hardware",
component: () =>
import(/* webpackChunkName: "hardware" */ "../views/Hardware.vue")
},
Going to /hardware directly using a link on an external site or typing it in the address bar does not work, gives me Page Not Found. But clicking on this link in my nav bar does work.
<router-link to="/hardware">Hardware</router-link>
Am I missing something super obvious that I missed when I was learning routing? Is this because it is a single page application? Thanks in advance for any help.
Adding that I do have history mode on, wondering if this is the issue?
const router = new VueRouter({
mode: "history",
base: process.env.BASE_URL,
routes
});
mode:'history'for your router config/hardwareinstead of routing to#/hardware?const router. So the problem may lie on yourbaseoption. I didn't have issue on my vue-router gh-page of having/or not behind my param. Try remove the base option