mirror of
https://github.com/openai/harmony.git
synced 2025-08-22 16:17:08 -04:00
Initial commit
Co-authored-by: scott-oai <142930063+scott-oai@users.noreply.github.com> Co-authored-by: Zhuohan Li <zhuohan@openai.com>
This commit is contained in:
commit
253cdca537
70 changed files with 15013 additions and 0 deletions
30
demo/harmony-demo/next.config.ts
Normal file
30
demo/harmony-demo/next.config.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
webpack(config, { isServer, dev, webpack }) {
|
||||
// Use the client static directory in the server bundle and prod mode
|
||||
// Fixes `Error occurred prerendering page "/"`
|
||||
config.output.webassemblyModuleFilename =
|
||||
isServer && !dev
|
||||
? "../static/[modulehash].wasm"
|
||||
: "static/[modulehash].wasm";
|
||||
|
||||
// Since Webpack 5 doesn't enable WebAssembly by default, we should do it manually
|
||||
config.experiments = { ...config.experiments, asyncWebAssembly: true };
|
||||
|
||||
// https://nextjs.org/docs/app/building-your-application/optimizing/memory-usage#disable-webpack-cache
|
||||
// This just stops building altogether:
|
||||
// if (config.cache && !dev) {
|
||||
// config.cache = Object.freeze({
|
||||
// type: 'memory',
|
||||
// })
|
||||
// }
|
||||
|
||||
// Deubbing (vercel/next.js/issues/27650)
|
||||
config.infrastructureLogging = { debug: /PackFileCache/ };
|
||||
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
Loading…
Add table
Add a link
Reference in a new issue