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: intercept iconify api requests #136

Merged
merged 4 commits into from
Apr 21, 2023
Merged

feat: intercept iconify api requests #136

merged 4 commits into from
Apr 21, 2023

Conversation

userquin
Copy link
Member

@userquin userquin commented Apr 21, 2023

Description

This PR adds iconify api fetch interception to avoid make requests to iconify api server serving collections from local.

EDIT: icones is using prompt for update, this PR also updates it to use auto update, but we should use virtual module instead registerSW script (not included in the PR, ping me if you want to include it).

Linked Issues

closes #135

Additional context

iconify-icon provides also a way to disable local storage: I've included the required logic to disable it when using PWA:

  • added script to run dev server with PWA: it works also on dev server
  • added PWA to vite.define to allow use local storage when running dev server without PWA (current behavior)

imagen

@antfu antfu merged commit 221f4d8 into antfu-collective:main Apr 21, 2023
@antfu
Copy link
Member

antfu commented Apr 21, 2023

Ok, let's see how it goes

@userquin userquin deleted the userquin/feat-intercept-iconify-api-requests branch April 21, 2023 22:18
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.

use PWA cache storage to serve iconify collections
2 participants