If this PR is approved after any requested changes, the only change will be is that --base=/path requires a trailing slash: --base=/path/
Can you open a follow up to the docs once this…
I followed this process, and ran into the issues that led to me submitting this PR.
Okay, but do we need to update the docs?
If this PR is approved after any requested changes, the…
process.env.BASE_URL
is set by --base along with import.meta.env.BASE_URL
.
WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta]
…
It's just that we don't use vue cli, only vite. You probably mean https://vitejs.dev/guide/build.html#public-base-path for docs.
While vue cli is not used, the variable is still set and used…
I've pushed an update using createWebHistory
with a base set as an argument. This does work for me with the subfolder. Thank you @konrad for pointing that out.
Usages of process.env.BASE_URL are statically replaced at build time.
I am not sure about this. Where in the docs did you get this from? it was the case in vue-cli. In vite you would…
Even setting the base option in vite, the PWA setup does not pull that base path. I had to explicitly set it so that the PWA would be pulled from the correct path.
I could not get the basepath options to work, and did not know about the createWebHistory. I can rework this part to use it.
Hey, thanks for the pull request.
Documentation: https://cli.vuejs.org/guide/mode-and-env.html
This link is from vue-cli, probably you wantws to paste the other link here as…
All of the areas that are patched were identified through running the app in a test deployment using a sub-directory for the base.
This fixes issues with the service worker URL not being…