diff --git a/next.config.mjs b/next.config.mjs index 5166601..d3c5d3a 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,6 +1,5 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - output: 'export', basePath: process.env.NODE_ENV === "production" ? "" : "", assetPrefix: process.env.NODE_ENV === "production" ? "/" : "", images: { diff --git a/package.json b/package.json index d6ca172..c7688ee 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,7 @@ "scripts": { "dev": "next dev", "build": "next build", - "start": "npx serve@latest out -p 3000", - "serve": "npx serve@latest out", + "start": "next start", "lint": "next lint" }, "dependencies": { diff --git a/src/components/ui/lottie-down-splash.jsx b/src/components/ui/lottie-down-splash.jsx index 1b46d61..1418577 100644 --- a/src/components/ui/lottie-down-splash.jsx +++ b/src/components/ui/lottie-down-splash.jsx @@ -1,7 +1,12 @@ "use client"; import { useRef, useEffect } from "react"; -import { Player } from "@lottiefiles/react-lottie-player"; +import dynamic from "next/dynamic"; + +const Player = dynamic( + () => import("@lottiefiles/react-lottie-player").then((mod) => mod.Player), + { ssr: false } +); import lottieDownSplash from "/public/downward-splash-lottie"; export default function LottieDownSplash() { diff --git a/src/components/ui/lottie-paint.jsx b/src/components/ui/lottie-paint.jsx index ec2c242..cb0067a 100644 --- a/src/components/ui/lottie-paint.jsx +++ b/src/components/ui/lottie-paint.jsx @@ -1,7 +1,12 @@ "use client"; import { useRef, useEffect } from "react"; -import { Player } from "@lottiefiles/react-lottie-player"; +import dynamic from "next/dynamic"; + +const Player = dynamic( + () => import("@lottiefiles/react-lottie-player").then((mod) => mod.Player), + { ssr: false } +); import lottiePaint from "/public/paint-lottie"; export default function LottiePaint() { diff --git a/src/components/ui/lottie-splash.jsx b/src/components/ui/lottie-splash.jsx index 70937fd..64cf140 100644 --- a/src/components/ui/lottie-splash.jsx +++ b/src/components/ui/lottie-splash.jsx @@ -1,7 +1,12 @@ "use client"; import { useRef, useEffect } from "react"; -import { Player } from "@lottiefiles/react-lottie-player"; +import dynamic from "next/dynamic"; + +const Player = dynamic( + () => import("@lottiefiles/react-lottie-player").then((mod) => mod.Player), + { ssr: false } +); import lottieSplash from "/public/splash-lottie"; import pinkSplash from "/public/pink-splash-lottie"; import purpleSplash from "/public/purple-splash-lottie"; diff --git a/vercel.json b/vercel.json deleted file mode 100644 index 678d110..0000000 --- a/vercel.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "version": 2, - "builds": [ - { - "src": "package.json", - "use": "@vercel/next" - } - ], - "routes": [ - { - "src": "/(.*)", - "dest": "/$1" - }, - { - "src": "/(.*)\\.(jpg|jpeg|png|gif|ico|svg|css|js|woff|woff2|ttf|eot|txt|xml|pdf|doc|docx|xls|xlsx|ppt|pptx|mp4|webm|wav|mp3|m4a|aac|oga)$", - "headers": { - "cache-control": "public, max-age=31536000, immutable" - }, - "continue": true - }, - { - "src": "/(.*)\\.(json|xml|webmanifest)$", - "headers": { - "cache-control": "public, max-age=3600" - }, - "continue": true - }, - { - "src": "/(.*)\\.(html|htm)$", - "headers": { - "cache-control": "public, max-age=0, must-revalidate" - }, - "continue": true - } - ], - "build": { - "env": { - "NEXT_TELEMETRY_DISABLED": "1" - } - }, - "env": { - "NODE_ENV": "production" - } -}