-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.ts
More file actions
40 lines (33 loc) · 1.03 KB
/
Copy pathnext.config.ts
File metadata and controls
40 lines (33 loc) · 1.03 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
38
39
40
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Set the root directory for output file tracing to fix lockfile warning
outputFileTracingRoot: __dirname,
// Expose DEMO_MODE to client bundles too. `isDemoMode` (lib/demo/flag.ts) is
// read in client components (watch grid, sidebar, etc.); without this the
// browser would see `process.env.DEMO_MODE` as undefined and take non-demo
// paths even when the server is in demo mode.
env: {
DEMO_MODE: process.env.DEMO_MODE,
},
// Disable tracing to prevent EPERM errors on Windows
experimental: {
disableOptimizedLoading: false,
},
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
webpack: (config, { isServer }) => {
// Prevent webpack from watching .next directory
if (isServer) {
config.watchOptions = {
...config.watchOptions,
ignored: ["**/.next/**", "**/node_modules/**", "**/videos/**"],
};
}
return config;
},
};
export default nextConfig;