mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-26 06:11:15 +00:00
update
This commit is contained in:
48
web/next.config.mjs
Normal file
48
web/next.config.mjs
Normal file
@@ -0,0 +1,48 @@
|
||||
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,
|
||||
},
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
experimental: {
|
||||
webpackBuildWorker: true,
|
||||
parallelServerBuildTraces: true,
|
||||
parallelServerCompiles: true,
|
||||
},
|
||||
}
|
||||
|
||||
mergeConfig(nextConfig, userConfig)
|
||||
|
||||
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
|
Reference in New Issue
Block a user