mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-28 04:06:54 +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} */
|
/** @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
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user