Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions fixtures/nextjs-app/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const metadata = {title: 'Test App'}

export default function RootLayout({children}: {children: React.ReactNode}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
3 changes: 3 additions & 0 deletions fixtures/nextjs-app/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Home() {
return <main>Hello</main>
}
2 changes: 2 additions & 0 deletions fixtures/nextjs-app/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const nextConfig = {}
export default nextConfig
18 changes: 18 additions & 0 deletions fixtures/nextjs-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "nextjs-app-fixture",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build"
},
"dependencies": {
"next": "^16.2.2",
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
"devDependencies": {
"@types/react": "^19.2.14",
"typescript": "^5.8.3"
}
}
21 changes: 21 additions & 0 deletions fixtures/nextjs-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [{"name": "next"}],
"paths": {"@/*": ["./*"]}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
4 changes: 4 additions & 0 deletions knip.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const baseConfig = {
// Used for CLI
ignoreDependencies: ['sanity'],
},
'fixtures/nextjs-app': {
entry: ['app/**/*.{js,jsx,ts,tsx}'],
project: ['app/**/*.{js,jsx,ts,tsx}'],
},
'fixtures/prebuilt-app': {
entry: ['src/App.tsx'],
project,
Expand Down
2 changes: 2 additions & 0 deletions packages/@sanity/cli-test/src/test/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const DEFAULT_FIXTURES: Record<FixtureName, FixtureOptions> = {
'basic-studio': {},
'graphql-studio': {},
'multi-workspace-studio': {},
'nextjs-app': {},
'prebuilt-app': {includeDist: true},
'prebuilt-studio': {includeDist: true},
'worst-case-studio': {},
Expand All @@ -32,6 +33,7 @@ export type FixtureName =
| 'basic-studio'
| 'graphql-studio'
| 'multi-workspace-studio'
| 'nextjs-app'
| 'prebuilt-app'
| 'prebuilt-studio'
| 'worst-case-studio'
Expand Down
Loading
Loading