From b3c2f25c9b258ecb5c2f3651627be94015e854f7 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Thu, 18 Jul 2024 22:44:03 +0900
Subject: [PATCH] Fix next.config for new nextron
---
renderer/next.config.js | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/renderer/next.config.js b/renderer/next.config.js
index 60e1d31c..e2bd7265 100644
--- a/renderer/next.config.js
+++ b/renderer/next.config.js
@@ -1,10 +1,17 @@
/** @type {import('next').NextConfig} */
module.exports = {
+ output: 'export',
+ distDir:
+ process.env.NODE_ENV === 'production'
+ ? // we want to change `distDir` to "../app" so as nextron can build the app in production mode!
+ '../app'
+ : // default `distDir` value
+ '.next',
trailingSlash: true,
images: {
- unoptimized: true,
+ unoptimized: true
},
- webpack: (config) => {
+ webpack: config => {
return config
- },
+ }
}