From 1774317d667aed94b2a2f0acae885ce9420de8e2 Mon Sep 17 00:00:00 2001 From: Yuren Hao <97327730+YurenHao0426@users.noreply.github.com> Date: Sun, 2 Feb 2025 23:59:29 -0600 Subject: Add files via upload initialization --- next.config.mjs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 next.config.mjs (limited to 'next.config.mjs') diff --git a/next.config.mjs b/next.config.mjs new file mode 100644 index 0000000..060b74a --- /dev/null +++ b/next.config.mjs @@ -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 -- cgit v1.2.3