|
1 | 1 | 'use strict'; |
| 2 | + |
| 3 | +import platform from '#platform/next.config.mjs'; |
2 | 4 | import createNextIntlPlugin from 'next-intl/plugin'; |
3 | 5 |
|
4 | | -import { OPEN_NEXT_CLOUDFLARE } from './next.constants.cloudflare.mjs'; |
5 | 6 | import { BASE_PATH, ENABLE_STATIC_EXPORT } from './next.constants.mjs'; |
6 | | -import { getImagesConfig } from './next.image.config.mjs'; |
7 | 7 | import { redirects, rewrites } from './next.rewrites.mjs'; |
8 | 8 |
|
9 | | -const getDeploymentId = async () => { |
10 | | - if (OPEN_NEXT_CLOUDFLARE) { |
11 | | - // If we're building for the Cloudflare deployment we want to set |
12 | | - // an appropriate deploymentId (needed for skew protection) |
13 | | - const openNextAdapter = await import('@opennextjs/cloudflare'); |
14 | | - |
15 | | - return openNextAdapter.getDeploymentId(); |
16 | | - } |
17 | | - |
18 | | - return undefined; |
19 | | -}; |
20 | | - |
21 | 9 | /** @type {import('next').NextConfig} */ |
22 | 10 | const nextConfig = { |
| 11 | + ...platform, |
23 | 12 | // Full Support of React 18 SSR and Streaming |
24 | 13 | reactCompiler: true, |
25 | 14 | // We don't want to redirect with trailing slashes |
26 | 15 | skipTrailingSlashRedirect: true, |
27 | 16 | // We allow the BASE_PATH to be overridden in case that the Website |
28 | 17 | // is being built on a subdirectory (e.g. /nodejs-website) |
29 | 18 | basePath: BASE_PATH, |
30 | | - // Vercel/Next.js Image Optimization Settings |
31 | | - images: getImagesConfig(), |
32 | 19 | serverExternalPackages: ['twoslash'], |
33 | 20 | outputFileTracingIncludes: { |
34 | 21 | // Twoslash needs TypeScript declarations to function, and, by default, Next.js |
@@ -81,7 +68,6 @@ const nextConfig = { |
81 | 68 | // Faster Development Servers with Turbopack |
82 | 69 | turbopackFileSystemCacheForDev: true, |
83 | 70 | }, |
84 | | - deploymentId: await getDeploymentId(), |
85 | 71 | }; |
86 | 72 |
|
87 | 73 | const withNextIntl = createNextIntlPlugin('./i18n.tsx'); |
|
0 commit comments