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

Load assets from relative path #1588

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Load assets from relative path #1588

merged 1 commit into from
Jan 23, 2024

Conversation

aceArt-GmbH
Copy link
Contributor

@aceArt-GmbH aceArt-GmbH commented Dec 14, 2023

Description

Deploying cinny on a sub path like /cinny/ breaks loading of some assets.
Use relative path to prevent 404s.

  • rendering PDFs
  • web app manifest
  • web app icons
  • web app start

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@aceArt-GmbH aceArt-GmbH changed the title Load pdf.worker.min.js from relative path Load assets from relative path Dec 27, 2023
Copy link

github-actions bot commented Jan 22, 2024

Preview: https://1588--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

@aceArt-GmbH
Copy link
Contributor Author

So it seems now the manifest is correctly prefixed if build.config.ts is changed.
And pdf.worker.min.js is also loaded correctly.
Only the contents inside the manifest are not changed by vite

@aceArt-GmbH
Copy link
Contributor Author

So I just tested again. The paths in the manifest.json don't need further changing (from vite) as they are relative to the manifest itself.
So this should be fine now

@aceArt-GmbH aceArt-GmbH requested a review from ajbura January 23, 2024 07:20
Copy link
Member

@ajbura ajbura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes. LGTM now

@ajbura ajbura merged commit ef2733d into cinnyapp:dev Jan 23, 2024
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2024
@aceArt-GmbH aceArt-GmbH deleted the sub branch January 23, 2024 14:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants