Skip to content

Instantly share code, notes, and snippets.

@martin2844
Created August 17, 2025 21:10
Show Gist options
  • Save martin2844/be7fb2557e9449562ec941a9d548b64b to your computer and use it in GitHub Desktop.
Save martin2844/be7fb2557e9449562ec941a9d548b64b to your computer and use it in GitHub Desktop.
/** @type {import('next').NextConfig} */
const nextConfig = {
serverExternalPackages: ["knex", "node-ssh", "discord.js", "zlib-sync"],
output: "standalone",
webpack: (config, options) => {
// Handle zlib-sync issue on ARM architecture
config.resolve.alias = {
...config.resolve.alias,
'zlib-sync': false
};
// Handle Node.js built-in modules and node: protocol
config.resolve.fallback = {
...config.resolve.fallback,
'child_process': false,
'fs': false,
'net': false,
'tls': false,
'os': false,
'path': false,
"worker_threads": false,
"timers": false,
"zlib": false,
};
return config;
},
};
export default nextConfig;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment