-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathnext.config.js
More file actions
34 lines (26 loc) · 745 Bytes
/
next.config.js
File metadata and controls
34 lines (26 loc) · 745 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
// import type { NextConfig } from "next";
// const nextConfig: NextConfig = {
// /* config options here */
// };
// export default nextConfig;
//
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config, { isServer }) => {
// Handle optional ws dependencies
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
'utf-8-validate': false,
'bufferutil': false,
};
}
// Suppress warnings about optional dependencies
config.ignoreWarnings = [
/Module not found: Error: Can't resolve 'utf-8-validate'/,
/Module not found: Error: Can't resolve 'bufferutil'/,
];
return config;
},
};
module.exports = nextConfig;