我正在使用最新的 NextJS 14。在上面的 next.config.mjs 文件中,我将 nextConfig 包装在两个插件中,但是当我将它们部署到 Vercel 时,它根本无法构建。我对这种情况比较陌生,所以我停止使用 plaiceholder,转而使用 Jimp 来模糊我的图像,效果很流畅。尽管如此,我想知道这里的解决方案是什么,以防我想再次使用此设置。
import createNextIntlPlugin from "next-intl/plugin";
import withPlaiceholder from "@plaiceholder/next";
const withNextIntl = createNextIntlPlugin();
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
hostname: "firebasestorage.googleapis.com",
},
{
protocol: "https",
hostname: "cdn.sanity.io",
},
],
},
env: {
POSTGRES_PRISMA_URL: process.env.POSTGRES_PRISMA_URL,
POSTGRES_URL_NON_POOLING: process.env.POSTGRES_URL_NON_POOLING,
},
};
export default withPlaiceholder(withNextIntl(nextConfig));