Skip to content

Instantly share code, notes, and snippets.

@themegabyte
Last active November 20, 2022 19:21
Show Gist options
  • Select an option

  • Save themegabyte/81db9dd05a958d31ec89dfdd38231cd2 to your computer and use it in GitHub Desktop.

Select an option

Save themegabyte/81db9dd05a958d31ec89dfdd38231cd2 to your computer and use it in GitHub Desktop.
next config if you get client side errors in next js production build. This will generate an unminified version which is easier to debug.
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
output: "standalone",
serverRuntimeConfig: {
PROJECT_ROOT: __dirname,
},
webpack: (config) => {
config.optimization.minimize = false;
return config;
},
};
module.exports = nextConfig;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment