const routes = require ( "next-routes" ) ( ) ; const HomePage = "/HomePage/HomePage" ; const allRoutes = [ { name : "home" , pattern : "/" , page : HomePage } ] ; function addRoutes ( ) { allRoutes . forEach ( ( route ) => { routes . add ( { name : route . name , pattern : route . pattern , page : route . page } ) ; } ) ; } addRoutes ( ) ; const Link = routes . Link ; export default routes ; export { Link } ;