funmiles / sveltekitpwa Goto Github PK
View Code? Open in Web Editor NEWAn experimental Progressive Web App based on Svelte-kit
Home Page: sveltekit-pwa.vercel.app
An experimental Progressive Web App based on Svelte-kit
Home Page: sveltekit-pwa.vercel.app
Error: $page.path has been replaced by $page.url.pathname
src/lib/Header/index.svelte (18, 19, 20)
Error: request.query has been replaced by request.url.searchParams
src/hooks.ts (10, 11)
Could not find a declaration file for module 'cookie'. ts(7016)
src/hooks.ts (1)
Property 'render' does not exist on type '{ request: ServerRequest<Record<string, any>, unknown>; resolve(request: ServerRequest<Record<string, any>, unknown>): MaybePromise<ServerResponse>; }'. ts(2339)
src/hooks.ts (5, 14)
Object is possibly 'null'. ts(2531)
src/hooks.ts (11)
Binding element 'url' implicitly has an 'any' type. ts(7031)
src/service-worker.ts (43)
;)
Thank you for writing this straight forward ServiceWorker, I've tested many, but yours is stable and working OOTB! ๐
Issue: End-to-end testing works on desktop and mobile, offline โ but auditing with Lighthouse (Chrome Dev tools), throws:
cannot register service worker DOMException: Failed to register a ServiceWorker for scope ('https://offline-phi.vercel.app/') with script ('https://offline-phi.vercel.app/service-worker.js'): Operation has been aborted
This app can not get past ~80% and takes a long time to cancel the audit in Chrome Dev tools, Lighthouse.
Do you have any suggestions? It'd be useful to be able to speed test the template before adding content.
Hi
Is there a way how to enable debug logging? As you don't have the "workbox" object available in your service worker I don't see an option how to set workbox.setConfig({ debug: true });
Thanks in advance
Hello again.
Last June/July I merged your repo into a new one, which worked across the board in Lighthouse: 100%.
So, vis-ร -vis the current problem, I've merged the repo again using SvelteKit Version 1 (npm create svelte@latest my-app
), and it works, but I get: Cannot register service worker TypeError
in Chrome devtools.
Here's my progress:
What to look for in devtools:
cannot register service worker TypeError: Failed to register a ServiceWorker for scope ('https://lowenergy.vercel.app/') with script ('https://lowenergy.vercel.app/service-worker.js'): ServiceWorker script evaluation failed
&
cannot register service worker TypeError: Failed to register a ServiceWorker for scope ('https://lowenergy.vercel.app/') with script ('https://lowenergy.vercel.app/service-worker.js'): ServiceWorker script evaluation failed
&
cannot register service worker DOMException: Failed to register a ServiceWorker for scope ('https://lowenergy.vercel.app/') with script ('https://lowenergy.vercel.app/service-worker.js'): Operation has been aborted
It's not clear exactly HOW to register this?
I am trying to use SveltekitPWA with the Vite/Svelte inspector, which is available using an entry to svelte.config.js
:
/** @type {import('@sveltejs/kit').Config} */
const config = {
experimental: { inspector: true },
...
However, merging SveltekitPWA with the latest Sveltekit, highlights breaking changes โ notably: hooks.ts
throws: sveltejs/kit#3384.
Have you had a chance to look at the new interface?
Repo: https://github.com/inspiredlabs/inspector
demo: https://offline-phi.vercel.app
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.