From 10deed8e3ff13b32a07c8dd179b158154d7c99c5 Mon Sep 17 00:00:00 2001 From: superfaz <16510828+superfaz@users.noreply.github.com> Date: Thu, 14 Dec 2023 22:09:27 +0100 Subject: [PATCH] Fix for Azure deployment --- next.config.mjs | 18 ++++++++++-------- package.json | 1 - 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 9ea109cd..9527fd26 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,9 +1,11 @@ -export default function nextConfig(phase, { defaultConfig }) { - console.log(phase); - console.log(defaultConfig); - console.log(process.env); - - return { - output: "standalone", - }; +export default function nextConfig() { + if (process.env.GITHUB_WORKFLOW) { + // Configuration for Azure Static Web Apps + return { + output: "standalone", + }; + } else { + // Default configuration + return {}; + } } diff --git a/package.json b/package.json index e87cd26c..8a7caffc 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "scripts": { "dev": "next dev", "build": "next build", - "build:azure": "next build", "start": "next start", "lint": "next lint" },