API | nuxt router param
TherouterpropertyletsyoucustomizeNuxt.jsrouter(vue-router[1]).baseType:StringDefault:/ThebaseURLoftheapp.Forexample,iftheentiresinglepageapplicationisservedunder/app/,thenbaseshouldusethevalue/app/.ThiscanbeusefulifyouneedtoserveNuxtasadifferentcontextroot,fromwithinabiggerWebsite.Noticethatyoumay,ormaynotsetupaFrontProxyWebServer.Ifyouwanttohavearedirecttorouter.base,youcandosousingaHook,seeRedirecttorouter.basewhennotonroot[2].Example(nuxt.config.js):exportdefault{router:{base:/app/}}Whenb...
The router property lets you customize Nuxt.js router (vue-router[1]).
baseType: String Default: /The base URL of the app. For example, if the entire single page application is served under /app/, then base should use the value /app/.
This can be useful if you need to serve Nuxt as a different context root, from within a bigger Web site. Notice that you may, or may not set up a Front Proxy Web Server.
If you want to have a redirect to router.base, you can do so using a Hook, see Redirect to router.base when not on root[2].
Example (nuxt.config.js):
export default { router: { base: /app/ } }When base is set, Nuxt.js will also add in the document header <base href="{{ router.base }}"/>.
This option is given directly to the vue-router base[3].
routeNameSplitterType: String Default: -You may want to change the separator between route names that Nuxt.js uses. You can do so via the routeNameSplitter option in your co...