Root:3000
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,
}
})
]
})
2 replies