-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
version: nextPlanned to do or already included in the next(1.0.0) versionPlanned to do or already included in the next(1.0.0) version
Description
You have access to the route via .vuepress/enhanceApp.js and can add extra routes such as:
export default ({ Vue, router, options }) => {
router.addRoutes([
{ path: '/test', redirect: '/' }
])
}
or
const Test = () => import("./Test");
export default ({ Vue, options, router }) => {
router.addRoutes([
{ path: "/test", component: Test }
]);
};
And they work as expected when you run it is dev mode vurepress dev site. But when building the app vurepress build site the added routes do not get generated/prerendered, resulting in a 404 when trying to load the route for the first time.
As far as I can tell there is no other way to add routes to the generated list of routes which means that routes cannot be added dynamically via the site or themes.
samajammindanmichaelo
Metadata
Metadata
Assignees
Labels
version: nextPlanned to do or already included in the next(1.0.0) versionPlanned to do or already included in the next(1.0.0) version