-
Notifications
You must be signed in to change notification settings - Fork 7
/
next.config.js
43 lines (41 loc) · 1.15 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
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "raw.githubusercontent.com",
port: "",
pathname: "/**",
},
],
},
reactStrictMode: true,
webpack: (config) => {
config.resolve.fallback = { fs: false, net: false, tls: false };
config.externals.push("pino-pretty", "lokijs", "encoding");
return config;
},
// Adding CORS Headers for safe to access the manifest.json
headers: async () => {
return [
{
source: "/:path*",
headers: [
{ key: "Access-Control-Allow-Credentials", value: "true" },
{ key: "Access-Control-Allow-Origin", value: "https://safe.neobase.one" },
{ key: "Access-Control-Allow-Methods", value: "GET" },
{
key: "Access-Control-Allow-Headers",
value:
"X-Requested-With, content-type, Authorization",
},
],
},
];
},
};
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
module.exports = withBundleAnalyzer(nextConfig);