-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
BASE_URL resolves to undefined #669
Comments
try using check https://vitejs.dev/guide/env-and-mode.html#env-variables |
is your |
Hi Userquin Thanks for your suggestions yes it’s in the src directory. |
Hi Again, @userquin that helped as now there is no 'undefined' when loading Here is what I do have regarding service worker related files in the directories:
So should my src/registerServiceWorker.js file not reference sw.js
this:
Thanks! |
Add FYI: if your application already deployed with old service worker (via |
Thanks so much @userquin Yes, I have the following in my config:
So the idea is to deploy once with selfDestroying set to true, then set it to false and deploy again to force the new service worker? Really appreciate your help on this. |
do you have your application deployed? can your shared the repo if public? find me on discord |
Hi All
I'm really stuck with something and hoping someone could help me out.
I've built my app using Ionic with vue-cli
"@vitejs/plugin-vue": "^4.5.0",
"@vue/cli-plugin-pwa": "~4.5.12",
"register-service-worker": "^1.7.1",
I installed vite-plugin-pwa and I have a registerServiceWorker.js file in the root of ./src
In this file it has the following:
In my production it is always resolving to :
so I get the following network errors:
The base setting of my vite.config.js is as follows:
Should BASE_URL not resolve to '' for production?
Thanks so much!
The text was updated successfully, but these errors were encountered: