Update next.config.mjs

This commit is contained in:
MacRimi 2025-02-14 11:44:56 +01:00 committed by GitHub
parent 8126a269d6
commit fb81517fc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,48 +1,20 @@
let userConfig = undefined
try {
userConfig = await import('./v0-user-next.config')
} catch (e) {
// ignore error
}
/** @type {import('next').NextConfig} */
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
output: "export",
images: {
unoptimized: true,
},
experimental: {
webpackBuildWorker: true,
parallelServerBuildTraces: true,
parallelServerCompiles: true,
assetPrefix: "/ProxMenux/",
basePath: "/ProxMenux",
staticPageGenerationTimeout: 180, // Aumentamos el tiempo de espera a 180 segundos
webpack: (config, { isServer }) => {
const path = require("path")
config.resolve.alias["@guides"] = path.join(__dirname, "..", "guides")
config.resolve.alias["@changelog"] = path.join(__dirname, "..", "CHANGELOG.md")
return config
},
}
mergeConfig(nextConfig, userConfig)
module.exports = nextConfig
function mergeConfig(nextConfig, userConfig) {
if (!userConfig) {
return
}
for (const key in userConfig) {
if (
typeof nextConfig[key] === 'object' &&
!Array.isArray(nextConfig[key])
) {
nextConfig[key] = {
...nextConfig[key],
...userConfig[key],
}
} else {
nextConfig[key] = userConfig[key]
}
}
}
export default nextConfig