Skip to content

Commit b17f6de

Browse files
committed
fixup! updates for Next 16
1 parent cbe4844 commit b17f6de

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

examples/e2e/experimental/next.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ const nextConfig: NextConfig = {
44
/* config options here */
55
cleanDistDir: true,
66
output: "standalone",
7+
cacheComponents: true,
78
typescript: {
89
// Ignore type errors during build for now, we'll need to figure this out later
910
ignoreBuildErrors: true,
1011
},
11-
experimental: {
12-
cacheComponents: true,
13-
},
1412
};
1513

1614
export default nextConfig;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { revalidateTag } from "next/cache";
22

33
export function GET() {
4-
revalidateTag("fullyTagged");
4+
revalidateTag("fullyTagged", { expire: 0 });
55
return new Response("DONE");
66
}

examples/e2e/experimental/src/components/cached.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { unstable_cacheLife, unstable_cacheTag } from "next/cache";
1+
import { cacheLife, cacheTag } from "next/cache";
22

33
export async function FullyCachedComponent() {
44
"use cache";
@@ -11,7 +11,7 @@ export async function FullyCachedComponent() {
1111

1212
export async function FullyCachedComponentWithTag() {
1313
"use cache";
14-
unstable_cacheTag("fullyTagged");
14+
cacheTag("fullyTagged");
1515
return (
1616
<div>
1717
<p data-testid="fully-cached-with-tag">{Date.now()}</p>
@@ -21,7 +21,7 @@ export async function FullyCachedComponentWithTag() {
2121

2222
export async function ISRComponent() {
2323
"use cache";
24-
unstable_cacheLife({
24+
cacheLife({
2525
stale: 1,
2626
revalidate: 5,
2727
});

packages/cloudflare/src/cli/build/bundle-server.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ export async function bundleServer(buildOpts: BuildOptions, projectOpts: Project
144144
// We make sure that environment variables that Next.js expects are properly defined
145145
"process.env.NEXT_RUNTIME": '"nodejs"',
146146
"process.env.NODE_ENV": '"production"',
147-
// The 2 following defines are used to reduce the bundle size by removing unnecessary code
148-
// Next uses different precompiled renderers (i.e. `app-page.runtime.prod.js`) based on if you use `TURBOPACK` or some experimental React features
149-
// Turbopack is not supported for build at the moment, so we disable it
150-
"process.env.TURBOPACK": "false",
151147
// This define should be safe to use for Next 14.2+, earlier versions (13.5 and less) will cause trouble
152148
"process.env.__NEXT_EXPERIMENTAL_REACT": `${needsExperimentalReact(nextConfig)}`,
153149
// Fix `res.validate` in Next 15.4 (together with the `route-module` patch)

0 commit comments

Comments
 (0)