-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
27 lines (24 loc) · 1005 Bytes
/
next.config.js
File metadata and controls
27 lines (24 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/** @type {import('next').NextConfig} */
const isTurbopack = Boolean(process.env.TURBOPACK);
const nextConfig = {
reactStrictMode: true,
// typedRoutes is not supported by Turbopack in Next 14.
// Enable it only when not running with Turbopack.
...(isTurbopack ? {} : { experimental: { typedRoutes: true } }),
// OpenNext Cloudflare will handle routing/worker generation;
// no need to force standalone output.
eslint: {
// Avoid requiring eslint installation in CI/build for this project
ignoreDuringBuilds: true,
},
};
module.exports = nextConfig;
// Start the OpenNext Cloudflare dev integration (spawns Wrangler, picks up proxy env vars)
// Note: do not await; Next loads the config twice in dev; this is resilient.
try {
// Dynamic import to avoid bundling and to work in CommonJS config.
// eslint-disable-next-line unicorn/prefer-top-level-await
import('@opennextjs/cloudflare')
.then((m) => m.initOpenNextCloudflareForDev?.())
.catch(() => {});
} catch {}