How do I set the base url in Vue Router 4? #10346
Unanswered
thepurpleblob
asked this question in
Help/Questions
Replies: 3 comments 1 reply
-
createRouter({
history: createWebHistory('/your/base/path')
}) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hmmm... so where is that documented? I'm wondering how I missed it. ...and thanks :) |
Beta Was this translation helpful? Give feedback.
1 reply
-
you can use dotEnv |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I must be missing something. In earlier versions you could pass a 'base:' parameter to createRouter(). However, this no longer seems to work. I can't see anything in the docs. There's a reference to 'base' as 'readonly' in the historymode interface but that's all I can find.
Secondary question - my dev site is just 'localhost' but my UAT site is at /mytestsite. So the base will apply to the latter but not the former. Is there an easy way to deal with that without having to build separately on each site?
Beta Was this translation helpful? Give feedback.
All reactions