From 4988692916c04308bcbeead93f6c6c5ebdbbd04f Mon Sep 17 00:00:00 2001 From: kjxbyz Date: Fri, 27 Oct 2023 17:13:39 +0800 Subject: [PATCH] fix: compatibility issues --- app/app/[lng]/[type]/page.tsx | 1 - app/app/[lng]/layout.tsx | 1 - app/app/[lng]/opengraph-image.tsx | 2 +- app/next.config.js | 3 +++ docs/app/[lng]/[type]/page.tsx | 1 - docs/app/[lng]/layout.tsx | 1 - docs/app/[lng]/opengraph-image.tsx | 2 +- docs/next.config.js | 3 +++ 8 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/app/[lng]/[type]/page.tsx b/app/app/[lng]/[type]/page.tsx index fd201ca1..1794a762 100644 --- a/app/app/[lng]/[type]/page.tsx +++ b/app/app/[lng]/[type]/page.tsx @@ -16,7 +16,6 @@ export async function generateMetadata({ params.lng === "en" ? "Blog" : "博客" } - 童话镇里一枝花, 人美歌甜陈一发.`, metadataBase: new URL("https://chenyifaer.com"), - themeColor: "#FFF", icons: { icon: "/logo.jpg", }, diff --git a/app/app/[lng]/layout.tsx b/app/app/[lng]/layout.tsx index 1918cba9..21b88a66 100644 --- a/app/app/[lng]/layout.tsx +++ b/app/app/[lng]/layout.tsx @@ -31,7 +31,6 @@ export async function generateMetadata({ params.lng === "en" ? "FaForever" : "FaForever" } - 童话镇里一枝花, 人美歌甜陈一发.`, metadataBase: new URL("https://chenyifaer.com"), - themeColor: "#FFF", icons: { icon: "/logo.jpg", }, diff --git a/app/app/[lng]/opengraph-image.tsx b/app/app/[lng]/opengraph-image.tsx index 09fa7d68..6bde78be 100644 --- a/app/app/[lng]/opengraph-image.tsx +++ b/app/app/[lng]/opengraph-image.tsx @@ -1,5 +1,5 @@ /* eslint-disable @next/next/no-img-element */ -import { ImageResponse } from "next/server"; +import { ImageResponse } from "next/og"; export const runtime = "edge"; export const alt = "Precedent - Building blocks for your Next.js project"; diff --git a/app/next.config.js b/app/next.config.js index d952f04d..e8ca1731 100644 --- a/app/next.config.js +++ b/app/next.config.js @@ -15,6 +15,9 @@ const nextConfig = { "vercel.com", ], }, + experimental: { + webpackBuildWorker: true, + }, env: { GIT_COMMIT_SHA: process.env.GIT_COMMIT_SHA || process.env.VERCEL_GIT_COMMIT_SHA, diff --git a/docs/app/[lng]/[type]/page.tsx b/docs/app/[lng]/[type]/page.tsx index 68d61d76..bb57b517 100644 --- a/docs/app/[lng]/[type]/page.tsx +++ b/docs/app/[lng]/[type]/page.tsx @@ -16,7 +16,6 @@ export async function generateMetadata({ params.lng === "en" ? "Blog" : "博客" } - 童话镇里一枝花, 人美歌甜陈一发.`, metadataBase: new URL("https://chenyifaer.com"), - themeColor: "#FFF", icons: { icon: "/faforever/logo.jpg", }, diff --git a/docs/app/[lng]/layout.tsx b/docs/app/[lng]/layout.tsx index 8820d258..bf74eaf4 100644 --- a/docs/app/[lng]/layout.tsx +++ b/docs/app/[lng]/layout.tsx @@ -30,7 +30,6 @@ export async function generateMetadata({ params.lng === "en" ? "FaForever" : "FaForever" } - 童话镇里一枝花, 人美歌甜陈一发.`, metadataBase: new URL("https://chenyifaer.com"), - themeColor: "#FFF", icons: { icon: "/faforever/logo.jpg", }, diff --git a/docs/app/[lng]/opengraph-image.tsx b/docs/app/[lng]/opengraph-image.tsx index 0bdc9d6b..ef48194a 100644 --- a/docs/app/[lng]/opengraph-image.tsx +++ b/docs/app/[lng]/opengraph-image.tsx @@ -1,5 +1,5 @@ /* eslint-disable @next/next/no-img-element */ -import { ImageResponse } from "next/server"; +import { ImageResponse } from "next/og"; export const runtime = "edge"; export const alt = "Precedent - Building blocks for your Next.js project"; diff --git a/docs/next.config.js b/docs/next.config.js index 534d7546..351c6bc7 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -14,6 +14,9 @@ const nextConfig = { ], unoptimized: true, }, + experimental: { + webpackBuildWorker: true, + }, env: { VERCEL_GIT_COMMIT_SHA: process.env.VERCEL_GIT_COMMIT_SHA, NEXT_PUBLIC_GOOGLE_ID: process.env.NEXT_PUBLIC_GOOGLE_ID,