Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating an app with: npm create ionic-svelte-app@latest no longer includes any pwa code? The src/lib folder is now empty when creating a new project. #84

Open
burggraf opened this issue Jul 24, 2023 · 11 comments

Comments

@burggraf
Copy link

Creating an app with: npm create ionic-svelte-app@latest no longer includes any pwa code? The src/lib folder is now empty when creating a new project.

The lib folders were removed by this commit on Feb 15:
4e6e7fe

@Tommertom
Copy link
Owner

Hi

Yes I did not feel that should be part of what the package should distribute also because the vite pwa api can change. Next the vite pwa docs have better documented info on service workers and so on.

Happy to hear other thoughts...

@burggraf
Copy link
Author

Can you at least just link to the docs on how to set up PWA in a project? Make it part of the setup flow at least.

@Tommertom
Copy link
Owner

You mean like adding a link in the closing comments?

Link to Vite PWA? https://github.com/vite-pwa/sveltekit

@burggraf
Copy link
Author

Yeah, I'd copy over the steps needed to set up the PWA and include it in your readme, and provide a link as well. :)

@Tommertom
Copy link
Owner

Feel like doing a PR on the README?

@burggraf
Copy link
Author

I created a branch and tried to push it, but I don't have access:

ERROR: Permission to Tommertom/svelte-ionic-app.git denied to burggraf.

@Tommertom
Copy link
Owner

You need to fork it and then create a change and then do a PR

@Tommertom
Copy link
Owner

Added a mention in the install script - add the end of it

image

@burggraf
Copy link
Author

Ok, I'm now revising this and when I create a new app with npm create ionic-svelte-app@latest and try to follow the instructions at https://github.com/vite-pwa/sveltekit, I'm lost. I've spent several hours on this and just can't get it to work. In your older build here, the default setup automatically set up a pwa with automatic app updating, and it was great. How can we get back to that awesome setup?

Does anyone have some working pwa code using the latest SveltKit setup here (preferably that allows apps to work offline and auto-updates like the app used to)?

@burggraf
Copy link
Author

I tried to build and deploy the demo app in the source tree here, and it installs a service worker, but it doesn't work offline (and I'm not sure if it auto-updates either.)

@burggraf
Copy link
Author

I was able to get things working by studying this project:
https://github.com/vite-pwa/sveltekit/tree/main/examples/sveltekit-ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants