Skip to content

Commit aab8ce4

Browse files
committed
Switch from NextJS -> Vite for supabase-todolist demo.
1 parent a18ea5e commit aab8ce4

35 files changed

+511
-899
lines changed

demos/example-vite/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default defineConfig({
1212
input: 'src/index.html'
1313
}
1414
},
15+
envDir: '..', // Use this dir for env vars, not 'src'.
1516
optimizeDeps: {
1617
// Don't optimize these packages as they contain web workers and WASM files.
1718
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673

demos/nextjs-supabase-todolist/.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

demos/nextjs-supabase-todolist/README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PowerSync + Supabase Next.js Demo: Todo List
1+
# PowerSync + Supabase Web Demo: Todo List
22

33
## Note: Beta Release
44

@@ -10,8 +10,6 @@ Demo app demonstrating use of the [PowerSync SDK for Web](https://www.npmjs.com/
1010

1111
A step-by-step guide on Supabase<>PowerSync integration is available [here](https://docs.powersync.com/integration-guides/supabase).
1212

13-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
14-
1513
## Getting Started
1614

1715
In your terminal, switch into the demo's directory:
@@ -56,19 +54,6 @@ Open a browser on the served URL and install the PWA.
5654

5755
## Learn More
5856

59-
To learn more about Next.js, take a look at the following resources:
60-
61-
- [Next.js documentation](https://nextjs.org/docs) - learn about Next.js features and API.
62-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
63-
64-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
65-
66-
Also check out [the PowerSync Web SDK on GitHub](https://github.com/powersync-ja/powersync-js/tree/main/packages/powersync-sdk-web) - your feedback and contributions are welcome!
57+
Check out [the PowerSync Web SDK on GitHub](https://github.com/powersync-ja/powersync-js/tree/main/packages/powersync-sdk-web) - your feedback and contributions are welcome!
6758

6859
To learn more about PowerSync, see the [PowerSync docs](https://docs.powersync.com).
69-
70-
## Deploy on Vercel
71-
72-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
73-
74-
Check out the [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

demos/nextjs-supabase-todolist/next.config.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

demos/nextjs-supabase-todolist/package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
"version": "0.1.10",
44
"private": true,
55
"scripts": {
6-
"build": "next build",
7-
"clean": "rm -rf .next",
8-
"watch": "next dev",
9-
"start": "next start",
10-
"lint": "next lint"
6+
"dev": "vite",
7+
"build": "tsc -b && vite build",
8+
"preview": "vite preview",
9+
"start": "pnpm build && pnpm preview"
1110
},
1211
"dependencies": {
13-
"@ducanh2912/next-pwa": "9.7.2",
1412
"@emotion/react": "^11.11.3",
1513
"@emotion/styled": "^11.11.0",
1614
"@fontsource/roboto": "^5.0.8",
@@ -26,19 +24,20 @@
2624
"lodash": "^4.17.21",
2725
"next": "14.1.0",
2826
"react": "^18",
29-
"react-dom": "^18"
27+
"react-dom": "^18",
28+
"react-router-dom": "^6.22.1"
3029
},
3130
"devDependencies": {
3231
"@types/lodash": "^4.14.202",
3332
"@types/node": "^20.11.16",
3433
"@types/react": "^18.2.55",
3534
"@types/react-dom": "^18.2.19",
35+
"@vitejs/plugin-react": "^4.2.1",
3636
"autoprefixer": "^10.4.17",
3737
"babel-loader": "^9.1.3",
38-
"eslint": "^8",
39-
"eslint-config-next": "14.0.0",
40-
"postcss": "^8.4.35",
41-
"tailwindcss": "^3.4.1",
42-
"typescript": "^5"
38+
"typescript": "^5",
39+
"vite": "^5.1.4",
40+
"vite-plugin-top-level-await": "^1.4.1",
41+
"vite-plugin-wasm": "^3.3.0"
4342
}
4443
}

demos/nextjs-supabase-todolist/postcss.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.

demos/nextjs-supabase-todolist/public/next.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

demos/nextjs-supabase-todolist/public/vercel.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

demos/nextjs-supabase-todolist/src/app/api/supabase/route.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)