From 7106bbdbf05c87dd5840dbce8d6d7a794ccdb712 Mon Sep 17 00:00:00 2001 From: diego tonini Date: Tue, 23 Jan 2024 10:39:51 +0100 Subject: [PATCH] fix: use base-path only on prod --- apps/docs/next.config.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/docs/next.config.js b/apps/docs/next.config.js index 7f8d1e6..4fbb54d 100644 --- a/apps/docs/next.config.js +++ b/apps/docs/next.config.js @@ -1,6 +1,10 @@ +const { PHASE_DEVELOPMENT_SERVER } = require("next/constants"); + /** @type {import('next').NextConfig} */ -module.exports = { - reactStrictMode: false, - output: "export", - basePath: "/react-use-zendesk", +module.exports = (phase, { defaultConfig }) => { + return { + reactStrictMode: false, + output: "export", + basePath: phase === PHASE_DEVELOPMENT_SERVER ? "" : "/react-use-zendesk", + }; };