-
Notifications
You must be signed in to change notification settings - Fork 10
/
next.config.mjs
80 lines (76 loc) · 2.78 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import bundlerAnalyzer from "@next/bundle-analyzer";
import packageInfo from './package.json' with { type: "json" };
const withBundleAnalyzer = bundlerAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
const cspHeader = `
default-src 'self';
script-src 'self' 'unsafe-eval' 'unsafe-inline' https://challenges.cloudflare.com https://www.youtube.com/iframe_api https://auth.privy.nounspace.com;
style-src 'self' 'unsafe-inline' https://i.ytimg.com https://mint.highlight.xyz;
img-src 'self' blob: data: https: https://i.ytimg.com;
font-src 'self' https:;
object-src 'self';
base-uri 'self';
form-action 'self';
frame-ancestors 'self';
frame-src 'self' https://auth.privy.nounspace.com https://verify.walletconnect.com https://verify.walletconnect.org https://challenges.cloudflare.com https://www.youtube.com https://*;
child-src 'self' https://auth.privy.nounspace.com https://verify.walletconnect.com https://verify.walletconnect.org https://www.youtube.com https://*;
connect-src 'self' ${process.env.NEXT_PUBLIC_SUPABASE_URL} https://auth.privy.nounspace.com https://privy.nounspace.com/api/v1/analytics_events wss://relay.walletconnect.com wss://relay.walletconnect.org wss://www.walletlink.org https://*.rpc.privy.systems https://auth.privy.io https://auth.privy.io/api/v1/apps/clw9qpfkl01nnpox6rcsb5wy3 wss://relay.walletconnect.com wss://relay.walletconnect.org wss://www.walletlink.org https://*.rpc.privy.systems;
upgrade-insecure-requests;
`;
/** @type {import('next').NextConfig} */
const nextConfig = {
// output: 'export', // Outputs a Single-Page Application (SPA).
// distDir: './dist', // Changes the build output directory to `./dist/`.
transpilePackages: ['react-tweet', 'react-best-gradient-color-picker'], // https://react-tweet.vercel.app/next,
typescript: {
ignoreBuildErrors: false,
},
env: {
NEXT_PUBLIC_VERSION: packageInfo.version,
},
images: {
remotePatterns: [
{
hostname: "*",
protocol: "http",
},
{
hostname: "*",
protocol: "https",
},
],
},
async redirects() {
return [
{
source: "/",
destination: "/home",
permanent: true,
},
{
source: '/signatures',
destination: 'https://docs.nounspace.com/nounspace-alpha/accounts/signatures',
permanent: true,
},
];
},
// async headers() {
// return [
// {
// source: '/(.*)',
// headers: [
// {
// key: 'Content-Security-Policy',
// value: cspHeader.replace(/\n/g, ''),
// },
// {
// key: 'X-Frame-Options',
// value: 'DENY',
// },
// ],
// },
// ];
// },
};
export default withBundleAnalyzer(nextConfig);