29 lines
646 B
TypeScript
29 lines
646 B
TypeScript
// next.config.ts
|
|
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
turbopack: {
|
|
// Turbopack handles WASM and workers natively — no extra rules needed
|
|
},
|
|
webpack: (config: any) => {
|
|
config.externals.push({
|
|
'bufferutil': 'bufferutil',
|
|
'utf-8-validate': 'utf-8-validate',
|
|
})
|
|
return config
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/(.*)",
|
|
headers: [
|
|
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
|
|
{ key: "Cross-Origin-Embedder-Policy", value: "require-corp" },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|