Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sandbox): migrate to nextjs 14 #3959

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file modified bun.lockb
Binary file not shown.
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
"url": "https://github.com/styled-components/styled-components/issues"
},
"homepage": "https://styled-components.com",
"workspaces": {
"packages": [
"packages/*"
]
},
"workspaces": [
"packages/*"
],
"engines": {
"node": ">= 14"
},
Expand Down
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"
]
}