From a7226b7c008daef62aac19331d58d7f00bcf81cc Mon Sep 17 00:00:00 2001 From: Jennifer Echenim Date: Mon, 11 Dec 2023 20:30:55 +0400 Subject: [PATCH 1/2] Set distDir based on NODE_ENV: production builds to `../api/static`, development builds to `.next` --- tools/walletextension/frontend/next.config.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/walletextension/frontend/next.config.js b/tools/walletextension/frontend/next.config.js index 0bb677dbb1..6e05945bd9 100644 --- a/tools/walletextension/frontend/next.config.js +++ b/tools/walletextension/frontend/next.config.js @@ -2,10 +2,8 @@ const nextConfig = { reactStrictMode: true, output: "export", - // distDir is where the static files are generated - // on dev mode, it is generated in .next folder in the root directory - // comment this during dev mode - distDir: "../api/static", + // distDir should be "../api/static" in production but .next in development + distDir: process.env.NODE_ENV === "production" ? "../api/static" : ".next", }; module.exports = nextConfig; From 6094dc116448f3410ef4318e685953294fb574d3 Mon Sep 17 00:00:00 2001 From: Jennifer Echenim Date: Mon, 8 Jan 2024 17:22:28 +0400 Subject: [PATCH 2/2] Update distDir in next.config.js --- tools/walletextension/frontend/next.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/walletextension/frontend/next.config.js b/tools/walletextension/frontend/next.config.js index 6e05945bd9..f6b0385fbb 100644 --- a/tools/walletextension/frontend/next.config.js +++ b/tools/walletextension/frontend/next.config.js @@ -3,7 +3,7 @@ const nextConfig = { reactStrictMode: true, output: "export", // distDir should be "../api/static" in production but .next in development - distDir: process.env.NODE_ENV === "production" ? "../api/static" : ".next", + distDir: process.env.NODE_ENV === "development" ? ".next" : "../api/static", }; module.exports = nextConfig;