forked from zen-browser/www
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
44 lines (42 loc) · 1.01 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
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
/** @type {import('next').NextConfig} */
const nextConfig = (phase, { defaultConfig }) => {
const defaultConfigWWW = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "raw.githubusercontent.com",
},
{
protocol: "https",
hostname: "cdn.jsdelivr.net",
port: "",
pathname: "/gh/zen-browser/**",
},
],
domains: ["localhost", "cdn.jsdelivr.net", "raw.githubusercontent.com"], // Allow images from jsDelivr
},
experimental: {
serverActions: {
// edit: updated to new key. Was previously `allowedForwardedHosts`
allowedOrigins: ["localhost:3000", "get-zen.vercel.app"],
},
},
compiler: {
styledComponents: true,
},
};
if (phase === PHASE_DEVELOPMENT_SERVER) {
return {
...defaultConfigWWW,
// development only config options here
};
}
return {
...defaultConfigWWW,
// production only config options here
output: "export",
};
};
module.exports = nextConfig;