-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
49 lines (45 loc) · 1.15 KB
/
next.config.mjs
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
46
47
48
49
import { withPayload } from '@payloadcms/next/withPayload';
import CopyPlugin from 'copy-webpack-plugin';
/** @type {import('next').NextConfig} */
const nextConfig = {
serverExternalPackages: ['chromiumly'],
redirects: async () => {
return [
{
source: '/',
destination: '/admin',
permanent: true,
},
];
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "cvman-prod.jcloud.ik-server.com",
port: "",
pathname: "/api/media/file/**",
},
{
protocol: "http",
hostname: "localhost",
port: "3000",
pathname: "/api/media/file/**",
},
],
},
webpack: (config) => {
config.experiments = {...config.experiments, asyncWebAssembly: true};
// append the CopyPlugin to copy the file to your public dir
config.plugins.push(
new CopyPlugin({
patterns: [
{ from: "./node_modules/pagedjs/dist/paged.polyfill.min.js", to: "./static/paged.polyfill.min.js" },
],
}),
)
// Important: return the modified config
return config
}
};
export default withPayload(nextConfig);