Is the "base" configuration must be the same between router and vite?What if I need different configuration? #1613
-
What problem does this feature solve?In router3, I can set different base between router and vite for multiple app with same static sources like js, css eg: in router in vite.config.js Why to do this? Because I need the event-id like '1','2','3' from the location.pathname, and it'ill be a part of router base like '/event/1/', and the packaged code's static sources path are all in the path '/event/', so it very easy to config differently in router3 What does the proposed API look like?The router4's base config like router3, can be different with vite's base, and the resources can be reslove correctly |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That is not possible, You can define a prefix in routes with routes: [
{ path: '/prefix', children: [{ path: '', name: 'Home' }, { path: 'about', name: 'About' }] }
] |
Beta Was this translation helpful? Give feedback.
That is not possible,
base
is to define a serving folder : https://router.vuejs.org/api/interfaces/RouterHistory.html#Properties-baseYou can define a prefix in routes with