From 4eb10134481d1164f78c3b59c4603dfab17f61de Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 13 May 2025 14:34:52 +0800 Subject: [PATCH] fix: jest run problem --- web/next.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/next.config.js b/web/next.config.js index 12b4163d8b..2d18dddaf0 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -13,7 +13,8 @@ const withMDX = require('@next/mdx')({ }, }) -const remoteImageURL = new URL(`${process.env.NEXT_PUBLIC_WEB_PREFIX}/**`) +// the default url to prevent parse url error when running jest +const remoteImageURL = new URL(`${process.env.NEXT_PUBLIC_WEB_PREFIX || 'http://localhost:3000'}/**`) /** @type {import('next').NextConfig} */ const nextConfig = {