Skip to content

Commit

Permalink
chore(sandbox): migrate to nextjs 14
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Nov 28, 2023
1 parent 7c065e0 commit 130a257
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 32 deletions.
Binary file modified bun.lockb
Binary file not shown.
16 changes: 16 additions & 0 deletions packages/sandbox/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import RootStyleRegistry from '../lib/registry';

export const revalidate = 0;

export default function AppLayout({ children }) {
return (
<html>
<head>
<title>RSC</title>
</head>
<body>
<RootStyleRegistry>{children}</RootStyleRegistry>
</body>
</html>
);
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// comment out 'use client' to see the context error
'use client';

import styled, { createGlobalStyle } from 'styled-components';
import ButtonExample from '../src/Button.example';

Expand Down
6 changes: 3 additions & 3 deletions packages/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"start": "next start"
},
"devDependencies": {
"next": "^12.2.0"
"next": "^14.0.0"
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"styled-components": "workspace:*"
},
"engines": {
Expand Down
25 changes: 0 additions & 25 deletions packages/sandbox/pages/_document.tsx

This file was deleted.

24 changes: 20 additions & 4 deletions packages/sandbox/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "ES2020",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
Expand All @@ -13,8 +17,20 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
"incremental": true,
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 130a257

Please sign in to comment.