Skip to content
Discussion options

You must be logged in to vote

You missed the process argument. This should resolve your environment variables properly if you declared them.

Corrected:

/** @type {import('next').NextConfig} */
const nextConfig = {
  output: "standalone",
  transpilePackages: ["next-mdx-remote"],
  images: {
    unoptimized: true,
  },
  env: {
    NEXT_PUBLIC_VERSION: process.env.NEXT_PUBLIC_VERSION,
    NEXT_PUBLIC_ENVIRONMENT: process.env.NEXT_PUBLIC_ENVIRONMENT,
    NEXT_PUBLIC_BUILD_DATE: process.env.NEXT_PUBLIC_BUILD_DATE,
    NEXT_PUBLIC_GIT_COMMIT: process.env.NEXT_PUBLIC_GIT_COMMIT,
  },
}

export default nextConfig;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lnlyct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants