mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-27 20:06:52 +00:00
Update next.config.mjs
This commit is contained in:
parent
8126a269d6
commit
fb81517fc4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user