Skip to content

Commit 51330df

Browse files
committed
Migrate nextjs demo
1 parent a1f2b47 commit 51330df

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

demos/example-nextjs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"version": "0.1.15",
44
"private": true,
55
"scripts": {
6-
"build": "next build",
6+
"build": "next build --webpack",
77
"clean": "rm -rf .next",
8-
"watch": "next dev",
8+
"watch": "next dev --webpack",
99
"start": "next start",
10-
"lint": "next lint",
10+
"lint": "eslint",
1111
"test:build": "pnpm build"
1212
},
1313
"dependencies": {

demos/example-nextjs/src/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const EntryPage = () => {
1313
return (
1414
<S.MainGrid container>
1515
<p>
16-
Syncing down from the backend. This will load indefinitely if you have not set up the connection correctly. Check the console for issues.
16+
Syncing down from the backend. This will load indefinitely if you have not set up the connection correctly.
17+
Check the console for issues.
1718
</p>
1819
<CircularProgress />
1920
</S.MainGrid>
@@ -39,7 +40,7 @@ const EntryPage = () => {
3940
<p>You currently have no customers. Please connect PowerSync to your database to see them sync down.</p>
4041
</S.CenteredGrid>
4142
) : (
42-
<S.CenteredGrid item xs={12} md={6} lg={5}>
43+
<S.CenteredGrid size={{ xs: 12, md: 6, lg: 5 }}>
4344
<div>
4445
{customers.map((c) => (
4546
<ListItem key={c.id}>{c.name}</ListItem>
@@ -52,7 +53,6 @@ const EntryPage = () => {
5253
);
5354
};
5455

55-
5656
namespace S {
5757
export const CenteredGrid = styled(Grid)`
5858
display: flex;

demos/example-nextjs/tsconfig.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es6",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -11,17 +15,27 @@
1115
"moduleResolution": "bundler",
1216
"resolveJsonModule": true,
1317
"isolatedModules": true,
14-
"jsx": "preserve",
18+
"jsx": "react-jsx",
1519
"incremental": true,
1620
"plugins": [
1721
{
1822
"name": "next"
1923
}
2024
],
2125
"paths": {
22-
"@/*": ["./src/*"]
26+
"@/*": [
27+
"./src/*"
28+
]
2329
}
2430
},
25-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26-
"exclude": ["node_modules"]
31+
"include": [
32+
"next-env.d.ts",
33+
"**/*.ts",
34+
"**/*.tsx",
35+
".next/types/**/*.ts",
36+
".next/dev/types/**/*.ts"
37+
],
38+
"exclude": [
39+
"node_modules"
40+
]
2741
}

0 commit comments

Comments
 (0)