Skip to content

Commit 59e0e66

Browse files
committed
Fix o1js WASM Load Issue in Next.js by Marking it as External Dependency
proto-kit/starter-kit#23
1 parent 0253e2b commit 59e0e66

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

apps/web/next.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const nextConfig = {
1414
},
1515
];
1616
},
17-
webpack(config) {
17+
webpack(config, { isServer}) {
1818
config.experiments = { ...config.experiments, topLevelAwait: true };
1919
config.resolve.fallback = {
2020
fs: false,
@@ -37,6 +37,10 @@ const nextConfig = {
3737
}),
3838
);
3939

40+
if (isServer) {
41+
config.externals.push('o1js');
42+
}
43+
4044
return config;
4145
},
4246
compress: false,

0 commit comments

Comments
 (0)