Skip to content

Commit 1e93dc4

Browse files
committed
fix build issue with url in config
1 parent a45e002 commit 1e93dc4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

next.config.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ jiti('./env');
99

1010
// const backendUrl = new URL(process.env.NEXT_PUBLIC_BACKEND_URL);
1111

12+
const backendUrl = new URL(process.env.BACKEND_URL);
13+
1214
const withNextIntl = createNextIntlPlugin();
1315
const nextConfig = withNextIntl({
1416
transpilePackages: ['opub-ui'],
1517
images: {
1618
remotePatterns: [
1719
{
18-
protocol: new URL(process.env.BACKEND_URL).protocol.slice(0, -1),
19-
hostname: new URL(process.env.BACKEND_URL).hostname,
20+
protocol: backendUrl.protocol.slice(0, -1),
21+
hostname: backendUrl.hostname,
2022
},
2123
// {
2224
// protocol: 'https',

0 commit comments

Comments
 (0)