-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
45 lines (42 loc) · 1.17 KB
/
next.config.js
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
41
42
43
44
45
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
webpack: (config) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
if (!Array.isArray(config.externals)) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
config.externals = [];
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
config.externals.push({
"utf-8-validate": "commonjs utf-8-validate",
bufferutil: "commonjs bufferutil"
});
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return config;
},
async rewrites() {
return [
{
source: '/api/socket/:path*',
destination: '/_next/socket/:path*',
},
];
},
images: {
domains: ["utfs.io","unsplash.com","source.unsplash.com","example.com","github.com"],
remotePatterns: [
{
protocol: 'https',
hostname: 'utfs.io',
pathname: '/a/**',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
pathname: '/a/**',
},
],
},
};
export default config;