fix: fix map rendering in react strict mode

This commit is contained in:
2026-09-28 21:34:28 +02:00
parent ba7ae10c31
commit ac3db34079
5 changed files with 243 additions and 6 deletions
+6 -1
View File
@@ -1,5 +1,10 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
// react-leaflet v4 creates maps in a render-phase ref callback, which breaks
// under React dev StrictMode's double-mount ("Map container is already
// initialized"). StrictMode only runs in dev, so production is unaffected.
reactStrictMode: false,
};
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",