Skip to content

Commit 7afb35c

Browse files
authored
Merge pull request #9 from hack4impact-calpoly/K-17-Put-the-WebGL-onto-a-React-Component
K-17 put the web gl onto a react component
2 parents 53fccac + 7c1ff96 commit 7afb35c

39 files changed

+2667
-3
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ yarn-error.log*
3232

3333
# typescript
3434
*.tsbuildinfo
35-
next-env.d.ts
35+
next-env.d.ts

next.config.js

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,45 @@
11
/** @type {import('next').NextConfig} */
2-
const nextConfig = {}
2+
const nextConfig = {
3+
async headers() {
4+
return [
5+
// WASM
6+
{
7+
source: "/game/:path*\\.wasm\\.br",
8+
headers: [
9+
{ key: "Content-Type", value: "application/wasm" },
10+
{ key: "Content-Encoding", value: "br" },
11+
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
12+
],
13+
},
14+
// DATA
15+
{
16+
source: "/game/:path*\\.data\\.br",
17+
headers: [
18+
{ key: "Content-Type", value: "application/octet-stream" },
19+
{ key: "Content-Encoding", value: "br" },
20+
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
21+
],
22+
},
23+
// Framework JS
24+
{
25+
source: "/game/:path*\\.framework\\.js\\.br",
26+
headers: [
27+
{ key: "Content-Type", value: "application/javascript" },
28+
{ key: "Content-Encoding", value: "br" },
29+
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
30+
],
31+
},
32+
// Symbols (optional but common)
33+
{
34+
source: "/game/:path*\\.symbols\\.json\\.br",
35+
headers: [
36+
{ key: "Content-Type", value: "application/json" },
37+
{ key: "Content-Encoding", value: "br" },
38+
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
39+
],
40+
},
41+
];
42+
},
43+
};
344

4-
module.exports = nextConfig
45+
module.exports = nextConfig;
3.89 MB
Binary file not shown.
74.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)