contractApproval/next.config.js
2026-06-26 15:56:49 +08:00

20 lines
495 B
JavaScript

const nextConfig = {
webpack: (config, { isServer }) => {
config.cache = false; // Disable webpack cache to completely prevent stale chunk errors
if (isServer) {
config.externals = config.externals || [];
config.externals.push('sql.js');
}
// sql.js needs to load the WASM file
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
path: false,
crypto: false,
};
return config;
},
};
module.exports = nextConfig;