-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
40 lines (34 loc) · 1.02 KB
/
next.config.js
File metadata and controls
40 lines (34 loc) · 1.02 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
/** @type {import('next').NextConfig} */
const nextConfig = {
// Regular build for embedding in CLI package
// No static export to avoid Html import issues
// Configure for production deployment
images: {
unoptimized: true,
},
// Fix production build issues
productionBrowserSourceMaps: true, // Enable source maps for debugging
webpack: (config, { isServer }) => {
// Handle node modules for xterm
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
path: false,
os: false,
};
// Fix "Cannot read properties of undefined (reading 'call')" error
if (!isServer) {
config.optimization = {
...config.optimization,
minimize: true,
minimizer: config.optimization.minimizer ?
config.optimization.minimizer.filter(minimizer => {
// Keep only safe minimizers
return !minimizer.constructor.name.includes('Terser');
}) : [],
};
}
return config;
},
}
module.exports = nextConfig