Skip to content

Conversation

@Manahil-Afzal
Copy link

@walterbender
_Take a look on this and tell me how should I proceed with issue

Functionalites:
Added globPatterns and included hashed SVG/PNG assets in the Vite PWA configuration to ensure offline support. Previously, these assets were missing when offline.

Changes Made:

  1. Updated vite.config.ts to include globPatterns: ['**/*.{js,css,html,svg,png,wav}'].

  2. Added hashed assets (e.g 'build-53e87ed8.svg',
    'close-444dc9a6.svg',
    'code-74870b2e.svg',
    'exportDrawing-aee43b5d.svg',
    'help-a0383ce2.svg',
    'logo-3080f493.png',
    'mouse-46cf41ce.svg',
    'pin-8515e01d.svg',
    'reset-a8de2102.svg',
    'run-123f2282.svg',
    'saveProjectHTML-e442bff6.svg',
    'startRecording-5dec9e0d.svg',
    'stop-aa193098.svg',
    'stopRecording-48f9a011.svg',
    'unpin-427cfcc6.svg')
    to includeAssets.

Issue:
Offline mode did not load certain SVG/PNG assets.

Resolution:
Workbox now precaches all matching assets, including hashed files, ensuring proper offline functionality.

Testing Preview:

Testing

=> Checked that all SVG and PNG assets appear in the browser’s cache storage.
=> Tested the app offline to ensure all images render correctly.
=> Case Closed

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.

1 participant