File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,9 +2,6 @@ import type { NextConfig } from "next";
22
33const nextConfig : NextConfig = {
44 output : "standalone" ,
5- experimental : {
6- inlineCss : true ,
7- } ,
85 env : {
96 CESIUM_BASE_URL : "/cesium/" ,
107 NEXT_PUBLIC_BUILD_TARGET : process . env . NEXT_PUBLIC_BUILD_TARGET || "" ,
@@ -23,6 +20,19 @@ const nextConfig: NextConfig = {
2320 } ,
2421 ] ;
2522 } ,
23+ async rewrites ( ) {
24+ return [
25+ // Some bundled CSS (notably Leaflet) emits asset url()s as
26+ // /static/media/* instead of the served /_next/static/media/*. The
27+ // standalone server (and the Electron desktop build that runs it) only
28+ // serves assets under /_next/static, so those requests 404. Map them so
29+ // the assets resolve wherever they are referenced from.
30+ {
31+ source : "/static/media/:path*" ,
32+ destination : "/_next/static/media/:path*" ,
33+ } ,
34+ ] ;
35+ } ,
2636 async headers ( ) {
2737 const securityHeaders = [
2838 { key : "X-Content-Type-Options" , value : "nosniff" } ,
You can’t perform that action at this time.
0 commit comments