Maps fix
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
|
@import 'leaflet/dist/leaflet.css';
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
@apply bg-gray-950 text-gray-100 font-mono;
|
@apply bg-gray-950 text-gray-100 font-mono;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import { useEffect } from "react";
|
|||||||
import { MapContainer, TileLayer, Marker, Popup, useMap } from "react-leaflet";
|
import { MapContainer, TileLayer, Marker, Popup, useMap } from "react-leaflet";
|
||||||
import L from "leaflet";
|
import L from "leaflet";
|
||||||
import type { NodeRecord, CallRecord } from "@/lib/types";
|
import type { NodeRecord, CallRecord } from "@/lib/types";
|
||||||
import "leaflet/dist/leaflet.css";
|
|
||||||
|
|
||||||
// Fix Leaflet default icon paths broken by webpack
|
// Fix Leaflet default icon paths broken by webpack
|
||||||
delete (L.Icon.Default.prototype as unknown as Record<string, unknown>)._getIconUrl;
|
delete (L.Icon.Default.prototype as unknown as Record<string, unknown>)._getIconUrl;
|
||||||
L.Icon.Default.mergeOptions({
|
L.Icon.Default.mergeOptions({
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
|
transpilePackages: ["leaflet", "react-leaflet"],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user