Skip to content

Commit 3e2e029

Browse files
import open-next adapter in next.config.mjs only if necessary
1 parent 445def8 commit 3e2e029

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apps/site/next.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
'use strict';
2-
import { getDeploymentId } from '@opennextjs/cloudflare';
32
import createNextIntlPlugin from 'next-intl/plugin';
43

54
import { BASE_PATH, ENABLE_STATIC_EXPORT } from './next.constants.mjs';
@@ -104,7 +103,7 @@ const nextConfig = {
104103
// process, onces it does that remove the manual `OPEN_NEXT_CLOUDFLARE`
105104
// definition in the package.json script.
106105
deploymentId: process.env.OPEN_NEXT_CLOUDFLARE
107-
? getDeploymentId()
106+
? (await import('@opennextjs/cloudflare')).getDeploymentId()
108107
: undefined,
109108
};
110109

0 commit comments

Comments
 (0)