forked from opactorai/Claudable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
30 lines (29 loc) · 793 Bytes
/
next.config.js
File metadata and controls
30 lines (29 loc) · 793 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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
productionBrowserSourceMaps: false,
output: 'standalone',
// Disable critters optimizeCss to avoid missing module during build
experimental: {
optimizeCss: false,
scrollRestoration: true,
},
// Inject project root path as environment variable
env: {
NEXT_PUBLIC_PROJECT_ROOT: process.cwd(),
},
// Add webpack configuration to handle server-side code properly
webpack: (config, { isServer }) => {
if (!isServer) {
// Exclude server-only modules from client bundle
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
path: false,
os: false,
};
}
return config;
},
};
module.exports = nextConfig;