mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
The issue: With base: './' for Electron, absolute paths like /shakespeare.svg don't work because they resolve to filesystem root in file:// protocol. The solution: Import assets so Vite transforms paths at build time. - import logo from '/shakespeare.svg' (without ?url) - Vite automatically converts to './shakespeare.svg' with base: './' - Works in both browser and Electron This is cleaner than ?url suffix which is unnecessarily Vite-specific. Fixed components: - ShakespeareLogo: import shakespeareLogo from '/shakespeare.svg' - AppShowcaseCard: import badgeSvg from '/badge.svg' Added PUBLIC_ASSETS_EXPLANATION.md documenting the solution.