Fix next.config for new nextron

This commit is contained in:
AkiraFukushima 2024-07-18 22:44:03 +09:00
parent 55d02a2e9a
commit b3c2f25c9b
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
1 changed files with 10 additions and 3 deletions

View File

@ -1,10 +1,17 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
module.exports = { 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, trailingSlash: true,
images: { images: {
unoptimized: true, unoptimized: true
}, },
webpack: (config) => { webpack: config => {
return config return config
}, }
} }