-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Commit with Static baseURL in vue project #125
Conversation
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
==========================================
+ Coverage 64.58% 64.68% +0.09%
==========================================
Files 24 24
Lines 2067 2067
==========================================
+ Hits 1335 1337 +2
+ Misses 581 580 -1
+ Partials 151 150 -1
Continue to review full report at Codecov.
|
Welcome @KThornley 🤗 I'm a bit busy today but will have look tomorrow for sure. |
I'll take a look tonight probably. If nothing comes between. |
@KThornley Hey. There is a LOT of change in the lock file. Was there a reason for that? :) |
Sorry overeager node plugin in IDE |
Have thought about how to inject baseURl found out that building the Vue app with |
Vue.prototype.$http = axios | ||
Vue.axios = axios | ||
const axiosInstance = axios.create({ | ||
baseURL: './' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that ./
will always be the default. Shouldn't this be just /
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will always be relative to the current base and since its a SPA that will be where ever it is served from. /
would be absolute so we would have to do some trickery of setting the conditional root and I am lazy :)
@KThornley Alright, this is looking good. Could you please do me a favour and add in tests which use a different setting than the default and see if everything is still okay? Like, we already know that it works with Thanks! |
Hi sorry just getting back to this, I think I can simplify this solution with just the changes to the vue project. I will revert my changes to the handler and see how I get on |
@KThornley Cool, thanks very much! :) |
Hi @KThornley. Do you have something on this or shall I pick it up and finish some of it? |
Hi @Skarlso I reverted the changes to handler and it works with just the vue changes and one minor path change to handler (below), seems to be that webpack adds extra /assets/css prefix to the font urls when relative paths are specified. Did you want me to close this pull request and recreate another with the squashed changes against your current master? It would probably be cleaner |
@KThornley nope it's fine like this mate. Thanks very much for your effort! |
Hi @KThornley. So I tried checking out the code and testing it a bit and when I created a pipeline this is what I've got:
Any ideas? |
I guess it's because the variable has been removed: https://github.com/gaia-pipeline/gaia/pull/125/files#diff-70915ea35952c4bd1a7a22357344cc59L15 I'm also not sure if we use this at other places too? 😅 |
Interesting. I still see it declared but a few lines below with instance variable assigned? |
Ah right. I'm not quite sure if already upgraded axios. axios/axios#1042 might be interesting here. |
Works, thanks man! |
Re Issue #124 I have done the initial changes for this configuration, However what is still outstanding is the dynamic injection of the baseUrl into the frontend at build and axios (I have currently hard coded this for my purposes). Do you have a design you would like followed for config injection into Vue?