Skip to content

Commit

Permalink
enable ppr
Browse files Browse the repository at this point in the history
PPR is required for the Suspense Fallbacks example
  • Loading branch information
dferber90 committed Jan 10, 2025
1 parent 6876875 commit e0dfc1d
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import Image from 'next/image';
import { generatePermutations } from '@vercel/flags/next';
import { Suspense } from 'react';

// opt into on parital prerendering for this page, which is necessary while
// it's experimental, see https://nextjs.org/learn/dashboard-app/partial-prerendering
// eslint-disable-next-line camelcase -- ok
export const experimental_ppr = true;

// prerender this page for all permutations of the flags
export async function generateStaticParams() {
const permutations = await generatePermutations(coreFlags);
Expand Down
3 changes: 3 additions & 0 deletions examples/snippets/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { withVercelToolbar } from '@vercel/toolbar/plugins/next';

/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
ppr: 'incremental' as const,
},
images: {
remotePatterns: [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"class-variance-authority": "0.7.1",
"clsx": "2.0.0",
"nanoid": "5.0.7",
"next": "15.1.4",
"next": "15.2.0-canary.3",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028",
"tailwind-merge": "2.5.5",
Expand Down
Loading

0 comments on commit e0dfc1d

Please sign in to comment.