Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ yarn-error.log*

# typescript
*.tsbuildinfo
next-env.d.ts
next-env.d.ts
45 changes: 43 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,45 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
async headers() {
return [
// WASM
{
source: "/game/:path*\\.wasm\\.br",
headers: [
{ key: "Content-Type", value: "application/wasm" },
{ key: "Content-Encoding", value: "br" },
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
],
},
// DATA
{
source: "/game/:path*\\.data\\.br",
headers: [
{ key: "Content-Type", value: "application/octet-stream" },
{ key: "Content-Encoding", value: "br" },
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
],
},
// Framework JS
{
source: "/game/:path*\\.framework\\.js\\.br",
headers: [
{ key: "Content-Type", value: "application/javascript" },
{ key: "Content-Encoding", value: "br" },
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
],
},
// Symbols (optional but common)
{
source: "/game/:path*\\.symbols\\.json\\.br",
headers: [
{ key: "Content-Type", value: "application/json" },
{ key: "Content-Encoding", value: "br" },
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
],
},
];
},
};

module.exports = nextConfig
module.exports = nextConfig;
Binary file not shown.
Binary file not shown.
Loading