err::insecure_response: solid-start `service-worker` with 'vite-plugin-pwa'
I'm trying to use
service-worker
and background-sync-api
for periodic data fetching with solidj-start
and vite-pwa
.
Static
and service-worker
both preset builds ok, but
localhost = service worker registers ☑️
https://domain.com = service worker registers 🛑 with err::insecure_response
vite.config
`js
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
VitePWA({
srcDir: ".output/public/",
filename: "service-worker.js",
strategies: "injectManifest",
injectRegister: false,
manifest: {
name: 'project',
short_name: 'project',
description: 'project',
theme_color: '#ffffff',
},
injectManifest: {
injectionPoint: undefined,
},
devOptions: {
enabled: true,
type: 'module'
},
build: {
target: "esnext",
polyfillDynamicImport: false,
}
})
]
})
1 Reply
Maybe the docs of pwa for solid start help?:
https://github.com/vite-pwa/vite-plugin-pwa/tree/f7f314783cc64f3824df5b8f465c14fc4896a59b/examples/solid-router
GitHub
vite-plugin-pwa/examples/solid-router at f7f314783cc64f3824df5b8f46...
Zero-config PWA for Vite. Contribute to vite-pwa/vite-plugin-pwa development by creating an account on GitHub.