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

feat: add sveltekit example #176

Merged
merged 30 commits into from
Dec 1, 2021
Merged

feat: add sveltekit example #176

merged 30 commits into from
Dec 1, 2021

Conversation

userquin
Copy link
Member

@userquin userquin commented Nov 28, 2021

This PR also includes:

  • autoUpdate examples for all frameworks using injectManifest strategy
  • updated examples cli to include behaviors for injectManifest strategy, also includes sveltekit framework
  • initial pwa docs for sveltekit

This PR will be on draft until I update the docs for sveltekit.

@antfu Once merge you should add sveltekit to the project tags.

closes #124

@netlify
Copy link

netlify bot commented Nov 28, 2021

✔️ Deploy Preview for vite-plugin-pwa ready!

🔨 Explore the source changes: 0b1fbd1

🔍 Inspect the deploy log: https://app.netlify.com/sites/vite-plugin-pwa/deploys/61a6c0f75f89f40007504862

😎 Browse the preview: https://deploy-preview-176--vite-plugin-pwa.netlify.app

@userquin
Copy link
Member Author

@antfu you should also add vitepress to project tags.

@userquin userquin marked this pull request as ready for review November 28, 2021 21:33
@userquin userquin requested a review from antfu November 28, 2021 21:34
@userquin
Copy link
Member Author

@antfu I'm talking with Dominik and Ben trying to do a small review on the docs so don't merge yet.

@userquin
Copy link
Member Author

@benmccann also removed mode: development from pwa-configuration.js, will use from process.env.NODE_ENV

@userquin
Copy link
Member Author

userquin commented Nov 29, 2021

I need to update all injectManifest entries on pwa docs to include the new behaviors added in this PR, working on it...

@userquin
Copy link
Member Author

@antfu @benmccann Since we're using here @antfu/eslint-config, the tabs and spaces for sveltekit example project (on md files no problem) will differ and so anyone touching any file on the sveltekit example project will reformat the code. In my case, I have ESLint + TSLint configured on IntelliJ to lint on save.

any ideas to make it working?

userquin and others added 4 commits December 1, 2021 00:28
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
userquin and others added 2 commits December 1, 2021 01:24
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
@userquin userquin merged commit b48701b into main Dec 1, 2021
@userquin userquin deleted the docs/sveltekit branch December 1, 2021 00:46
@FunMiles
Copy link

FunMiles commented Dec 6, 2021

@userquin @benmccann I read the docs for sveltekit and am a bit scared. I have been running my own version of a PWA with sveltekit (@userquin knows it) and am interested in leveraging your work here. However, I have two deployment options: vercel and the node-based adapter. I am not yet clear what I need to do to have those working? The docs says it is complex 😄
I am bit overwhelmed with other work before I can dip my toe in that endeavor. Any hints?

@userquin
Copy link
Member Author

userquin commented Dec 6, 2021

@userquin @benmccann I read the docs for sveltekit and am a bit scared. I have been running my own version of a PWA with sveltekit (@userquin knows it) and am interested in leveraging your work here. However, I have two deployment options: vercel and the node-based adapter. I am not yet clear what I need to do to have those working? The docs says it is complex 😄 I am bit overwhelmed with other work before I can dip my toe in that endeavor. Any hints?

Hi @FunMiles , how long no news from you, take a look at the example in this repo, I think you are using the static-adapter.

EDIT: just remove the claims part. If you need some hint, see this repo https://github.com/userquin/sveltesociety.dev and checkout the pwa branch.

The pwa.js and pwa-configuration.js are on scripts folder.

@FunMiles
Copy link

FunMiles commented Dec 6, 2021

@userquin @benmccann I read the docs for sveltekit and am a bit scared. I have been running my own version of a PWA with sveltekit (@userquin knows it) and am interested in leveraging your work here. However, I have two deployment options: vercel and the node-based adapter. I am not yet clear what I need to do to have those working? The docs says it is complex 😄 I am bit overwhelmed with other work before I can dip my toe in that endeavor. Any hints?

Hi @FunMiles , how long no news from you, take a look at the example in this repo, I think you are using the static-adapter.

EDIT: just remove the claims part. If you need some hint, see this repo https://github.com/userquin/sveltesociety.dev and checkout the pwa branch.

The pwa.js and pwa-configuration.js are on scripts folder.

For vercel deployment, I am using the vercel-adapter. I am also looking at another deployment option and they would need the node-adapter. Hence my question.

@userquin
Copy link
Member Author

userquin commented Dec 6, 2021

can we go to Discord?

@FunMiles
Copy link

FunMiles commented Dec 6, 2021

sure. I am on.

@userquin
Copy link
Member Author

userquin commented Dec 6, 2021

I don't see you on ViteLand server.

@FunMiles
Copy link

FunMiles commented Dec 6, 2021

I wad in svelte-kit one. Opened the ViteLand.

@rogueyoshi
Copy link

rogueyoshi commented Dec 18, 2021

@userquin How does one cache external assets for offline use? Do I need to pass a rule to cache everything from my CDN's URLs?

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

Successfully merging this pull request may close these issues.

Add SvelteKit example
4 participants