summaryrefslogtreecommitdiff
path: root/next.config.mjs
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2025-01-06 23:48:56 -0800
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2025-01-06 23:48:56 -0800
commitb97f3b42e1bad5753728315b5c7ebdacf6f81172 (patch)
treea07cbc723346503792a70ca7c923a8838e64fdff /next.config.mjs
downloadpenguin-new-tab-b97f3b42e1bad5753728315b5c7ebdacf6f81172.tar.gz
penguin-new-tab-b97f3b42e1bad5753728315b5c7ebdacf6f81172.zip
initial commit
Diffstat (limited to 'next.config.mjs')
-rw-r--r--next.config.mjs49
1 files changed, 49 insertions, 0 deletions
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