chore(dev): enable Turbopack and lift typedRoutes out of experimental

`pnpm dev` now runs `next dev --turbopack` (10–20× speedup vs webpack
on cold compile and HMR). Promote `typedRoutes` out of `experimental`
to match Next 15.5's stable surface; auto-update `next-env.d.ts` to
reference the generated routes.d.ts. Ignore that file in eslint since
Next regenerates it and the triple-slash style is fixed by the
framework.

`next.config.ts` has no custom `webpack()` hook so reverting to the
plain dev server is one line if needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-09 04:09:56 +02:00
parent e01a87ff2e
commit 9b4aabe04b
4 changed files with 4 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ const eslintConfig = [
}, },
}, },
{ {
ignores: ["client-portal/**"], ignores: ["client-portal/**", "next-env.d.ts"],
}, },
]; ];

1
next-env.d.ts vendored
View File

@@ -1,5 +1,6 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@@ -65,9 +65,7 @@ const nextConfig: NextConfig = {
images: { images: {
remotePatterns: [{ protocol: 'https', hostname: '*.portnimara.com' }], remotePatterns: [{ protocol: 'https', hostname: '*.portnimara.com' }],
}, },
experimental: { typedRoutes: true,
typedRoutes: true,
},
outputFileTracingIncludes: { outputFileTracingIncludes: {
// Bundle the EOI source PDF so the in-app EOI pathway can read it at // Bundle the EOI source PDF so the in-app EOI pathway can read it at
// runtime in the standalone build. Reading via fs.readFile from // runtime in the standalone build. Reading via fs.readFile from

View File

@@ -4,7 +4,7 @@
"private": true, "private": true,
"packageManager": "pnpm@10.33.2", "packageManager": "pnpm@10.33.2",
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev --turbopack",
"build": "next build && pnpm build:server", "build": "next build && pnpm build:server",
"build:server": "esbuild src/server.ts --bundle --platform=node --target=node20 --format=cjs --outdir=dist --packages=external --tsconfig=tsconfig.server.json", "build:server": "esbuild src/server.ts --bundle --platform=node --target=node20 --format=cjs --outdir=dist --packages=external --tsconfig=tsconfig.server.json",
"build:worker": "esbuild src/worker.ts --bundle --platform=node --target=node20 --format=cjs --outdir=dist --packages=external --tsconfig=tsconfig.server.json", "build:worker": "esbuild src/worker.ts --bundle --platform=node --target=node20 --format=cjs --outdir=dist --packages=external --tsconfig=tsconfig.server.json",