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} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
eslint: { output: "export",
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
images: { images: {
unoptimized: true, unoptimized: true,
}, },
experimental: { assetPrefix: "/ProxMenux/",
webpackBuildWorker: true, basePath: "/ProxMenux",
parallelServerBuildTraces: true, staticPageGenerationTimeout: 180, // Aumentamos el tiempo de espera a 180 segundos
parallelServerCompiles: true, 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