-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathnext.config.ts
More file actions
37 lines (34 loc) · 1.01 KB
/
next.config.ts
File metadata and controls
37 lines (34 loc) · 1.01 KB
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
34
35
36
37
import type { NextConfig } from "next";
// Static import (instead of `readFileSync(join(__dirname, "package.json"))`)
// keeps Turbopack's Node File Tracer from flagging this file as doing
// dynamic filesystem work, which produced an "Encountered unexpected file
// in NFT list" warning during `bun run build`.
import pkg from "./package.json";
const allowedDevOrigins = process.env.FAILPROOFAI_ALLOWED_DEV_ORIGINS
? process.env.FAILPROOFAI_ALLOWED_DEV_ORIGINS.split(",").map((s) => s.trim()).filter(Boolean)
: undefined;
const nextConfig: NextConfig = {
...(allowedDevOrigins ? { allowedDevOrigins } : {}),
output: "standalone",
outputFileTracingExcludes: {
"*": [
"node_modules/@img/**",
"node_modules/sharp/**",
],
},
productionBrowserSourceMaps: false,
turbopack: {
root: __dirname,
},
images: {
unoptimized: true,
},
webpack: (config) => {
config.devtool = false;
return config;
},
env: {
NEXT_PUBLIC_APP_VERSION: pkg.version,
},
};
export default nextConfig;