vite-pwa / vite-plugin-pwa

Zero-config PWA for Vite

Home Page:https://vite-pwa-org.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

path does not match

kangdy opened this issue · comments

How can I solve this problem, the cache path is inconsistent with the request path, causing the cache to fail

image

image

@kangdy what're your vite.base and pwa plugin scope and base options?

image

vite.base: '//awp-assets.sankuai.com/data_fe/dataplat-wanxiang-vinci-static/'

@kangdy what're your vite.base and pwa plugin scope and base options?

@kangdy what're your vite.base and pwa plugin scope and base options?

My project static resources are deployed in another domain name, such as:
Static assets: assets.sankuai.com. Project access address http://wanxiang.data.st.sankuai.com/vinci/#/ or http://wanxiang.data.st.sankuai.com/udf/#/. Nginx will forward static resources, thank you.

@kangdy try adding on plugin base: 'http://wanxiang.data.st.sankuai.com/vinci/#/ and scope: '/vinci/#/', you also need to switch to https, the pwa will not work using http

Configured as you suggested, but still no success
image
image
image

Use https instead http on the plugin base option

@kangdy Review you nginx configuration, you should add the mime mapping for the manifest.webmanifest file, check the docs entry about nginx

@kangdy feel free to open a new issue if the problem persists