-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.ts
34 lines (30 loc) · 852 Bytes
/
next.config.ts
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
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
async headers() {
return [
{
source: "/v86/(.*)", // Add the appropriate route for which the headers are needed
headers: [
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
],
},
];
},
webpack: (config) => {
// Override the default webpack configuration
config.resolve.alias = {
...config.resolve.alias,
// "sharp$": false, // Disable sharp package (used by some image processing packages)
"onnxruntime-node$": false, // Disable onnxruntime-node for browser environments
};
return config;
},
};
module.exports = nextConfig;