Closed ilajosmanov closed 5 years ago
Describe the bug Service worker does not register.
To Reproduce
src/registerServiceWorker.js
if (process.env.NODE_ENV === 'production' && process.client) { navigator.serviceWorker.register("/service-worker.js"); }
npm run ssr:build
npm run ssr:start
Please indicate versions of:
node: 11.0.0 vue-cli: 3 uvue: v0.1.0-alpha.18 os: MacOS browser: Chrome
Fixed.
if (process.client && process.env.NODE_ENV === 'production') { navigator.serviceWorker.register("/service-worker.js"); }
But not support .ts file
.ts
Describe the bug Service worker does not register.
To Reproduce
src/registerServiceWorker.js
and write next code:npm run ssr:build
npm run ssr:start
Please indicate versions of: