- for a multi-page project developed using vue-cli3, the configuration of pages is as follows:
pages: {
index: {
entry: "./resources/src/main.js",
template: "./resources/public/index.html",
filename: "index.html"
},
print: {
entry: "./resources/src/print/main.js",
template: "./resources/public/print.html",
filename: "print.html"
}
}
routing configuration in index:
[
{
path: `${prefix}/createAccount`,
name: "createAccount",
component: createAccount
}]
now access routes in index can be accessed normally by using localhost:8080/foreground/createAccount
routes in print are as follows:
[
{
path: `${prefix}/print`,
name: "print",
component: index,
beforeEnter: (to, from, next) => {
console.log("wer")
next()
}
}
]
but you can access the page by visiting localhost:8080/print.html, but you cannot use localhost:8080/print/foreground_print/print to access print routing-sharp-sharp-sharp problem description