Skip to content

Build your personal knowledge base with Trilium Notes

fix(geo_map): fix leaflet asset copying

Panagiotis Papadopoulosb8af8b4709e5
diff --git a/src/public/app/widgets/type_widgets/geo_map.ts b/src/public/app/widgets/type_widgets/geo_map.ts
index dbcebdeb32..8e2f4b7378 100644
--- a/src/public/app/widgets/type_widgets/geo_map.ts
+++ b/src/public/app/widgets/type_widgets/geo_map.ts
@@ -260,8 +260,8 @@ export default class GeoMapTypeWidget extends TypeWidget {
#buildIcon(bxIconClass: string, colorClass: string, title: string) {
return this.L.divIcon({
html: `\
- <img class="icon" src="${asset_path}/node_modules/leaflet/dist/images/marker-icon.png" />
- <img class="icon-shadow" src="${asset_path}/node_modules/leaflet/dist/images/marker-shadow.png" />
+ <img class="icon" src="${asset_path}/app-dist/leaflet/images/marker-icon.png" />
+ <img class="icon-shadow" src="${asset_path}/app-dist/leaflet/images/marker-shadow.png" />
<span class="bx ${bxIconClass} ${colorClass}"></span>
<span class="title-label">${title}</span>`,
iconSize: [25, 41],
diff --git a/webpack.config.ts b/webpack.config.ts
index bfafd6036d..d97598dd6a 100644
--- a/webpack.config.ts
+++ b/webpack.config.ts
@@ -34,6 +34,11 @@ const config: Configuration = {
context: "node_modules/@excalidraw/excalidraw/dist/prod/fonts/",
from: "**/*",
to: "excalidraw/fonts/"
+ },
+ {
+ context: "node_modules/leaflet/dist/images/",
+ from: "**/*",
+ to: "leaflet/images/"
}
]
})