Skip to content

Conversation

@dschmidt
Copy link
Contributor

@dschmidt dschmidt commented Oct 22, 2025

This works without opencloud-eu/web#1412 because the icons are inlined.
That PR will make sure this won't break even if the icon size is increased or the assetsInlineLimit is decreased.

Fixes #235

Copilot AI review requested due to automatic review settings October 22, 2025 10:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the icon loading mechanism in the web-app-maps package by importing icon assets directly through Vite's URL imports instead of using a static copy plugin with dynamically constructed paths. This eliminates the need for vite-plugin-static-copy and the associated asset path calculations.

Key Changes:

  • Removed vite-plugin-static-copy plugin and its configuration from the Vite config
  • Replaced dynamic path-based icon loading with direct imports using Vite's ?url suffix
  • Removed the dirname utility usage and assetsBaseUrl calculation

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
packages/web-app-maps/vite.config.ts Removed static copy plugin configuration and asset destination logic
packages/web-app-maps/src/composables/useLeaflet.ts Replaced dynamic asset path construction with direct icon imports
packages/web-app-maps/src/components/GpxMap.vue Updated GPX marker configuration to use imported icon URLs instead of path strings
packages/web-app-maps/package.json Removed vite-plugin-static-copy dependency
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dschmidt dschmidt changed the title fix(maps): import icons instead of messing with magic paths fix(maps): icons not showing Oct 22, 2025
import icon urls instead of messing with magic paths
@JammingBen JammingBen merged commit f49a9c9 into opencloud-eu:main Oct 22, 2025
5 checks passed
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.

[maps] icons are not showing

2 participants