-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mts
More file actions
33 lines (30 loc) · 1015 Bytes
/
Copy pathnext.config.mts
File metadata and controls
33 lines (30 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import type { NextConfig } from "next";
import { dirname } from "path";
import { fileURLToPath } from "url";
const __dirname = dirname(fileURLToPath(import.meta.url));
const nextConfig: NextConfig = {
outputFileTracingRoot: __dirname,
// Static export when building for Capacitor/Electron native platforms
output: process.env.NEXT_PUBLIC_STATIC_EXPORT === "true" ? "export" : undefined,
images: { unoptimized: true },
// Improve production build output
productionBrowserSourceMaps: false,
// Bundle analysis data available on CI
// Optimize performance
compiler: {
removeConsole: process.env.NODE_ENV === "production" ? {
exclude: ["error", "warn"],
} : false,
},
// Strict experimental options for production quality
experimental: {
optimizePackageImports: [
"lucide-react",
"@rainbow-me/rainbowkit",
],
},
// Security headers set via vercel.json for full CSP control
poweredByHeader: false,
reactStrictMode: true,
};
export default nextConfig;