-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
46 lines (46 loc) · 1.19 KB
/
next.config.mjs
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
44
45
46
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
turbo: {
nextScriptWorkers: true,
transpilePackages: ["@mlc-ai/web-llm"],
trustedPaths: ["/Qwen2.5-0.5B-Instruct-q4f16_1-MLC"],
webpack: (config) => {
config.output.webassemblyModuleFilename =
"static/wasm/[modulehash].wasm";
config.experiments = { ...config.experiments, asyncWebAssembly: true };
config.output.globalObject = "self";
return config;
},
images: {
domains: ["localhost", "natecard.dev", "github.com"],
remotePatterns: [
{
protocol: "https",
hostname: "natecard.dev",
},
{
protocol: "https",
hostname: "github.com",
},
],
unoptimized: process.env.NODE_ENV === "development",
},
async headers() {
return [
{
source: "/:path*.ts",
headers: [
{
key: "Content-Type",
value: "text/javascript",
},
],
},
];
},
reactStrictMode: true,
},
},
};
export default nextConfig;