-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnext.config.ts
More file actions
36 lines (32 loc) · 878 Bytes
/
next.config.ts
File metadata and controls
36 lines (32 loc) · 878 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
34
35
36
import type { NextConfig } from "next";
import { readFileSync } from "fs";
import { join } from "path";
const pkg = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf-8"));
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;