dressed_for_succes_store/frontend/next.config.mjs
ilya_zahvatkin 41c1385546 for deploy
2025-05-01 18:29:38 +07:00

73 lines
1.4 KiB
JavaScript

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,
domains: ['45.129.128.113', 'localhost', '0.0.0.0', '127.0.0.1'],
remotePatterns: [
{
protocol: 'http',
hostname: '45.129.128.113',
port: '9000',
pathname: '/dressedforsuccess/**',
},
{
protocol: 'http',
hostname: 'localhost',
pathname: '/dressedforsuccess/**',
},
{
protocol: 'http',
hostname: '0.0.0.0',
pathname: '/dressedforsuccess/**',
},
{
protocol: 'http',
hostname: '127.0.0.1',
pathname: '/dressedforsuccess/**',
},
],
},
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