From b97f3b42e1bad5753728315b5c7ebdacf6f81172 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Mon, 6 Jan 2025 23:48:56 -0800 Subject: initial commit --- next.config.mjs | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 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..6f4424f --- /dev/null +++ b/next.config.mjs @@ -0,0 +1,49 @@ +let userConfig = undefined +try { + userConfig = await import('./v0-user-next.config') +} catch (e) { + // ignore error +} + +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: false, + 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-70-g09d2