Skip to content

Commit f3ca2ab

Browse files
joshua-journey-appsJoshua Brink
andauthored
Update support multiple bundlers (#184)
Co-authored-by: Joshua Brink <[email protected]>
1 parent 96b7c99 commit f3ca2ab

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

tutorials/client/sdks/web/next-js.mdx

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,22 @@ In this tutorial, we’ll explore how to enhance a Next.js application with offl
1313

1414
### Next.js Project Setup
1515
Let's start by bootstrapping a new Next.js application using [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
16-
```shell
17-
pnpm dlx create-next-app@latest <project_name>
16+
<CodeGroup>
17+
18+
```shell npm
19+
npx create-next-app@latest my-powersync-app
20+
```
21+
22+
```shell yarn
23+
yarn create next-app my-powersync-app
1824
```
1925

26+
```shell pnpm
27+
pnpm create next-app my-powersync-app
28+
```
29+
30+
</CodeGroup>
31+
2032
When running this command you'll be presented with a few options. The PowerSync suggested selection for the setup options Next.js offers are:
2133
```shell
2234
Would you like to use TypeScript? Yes
@@ -40,10 +52,22 @@ Using PowerSync in a Next.js application will require the use of the [PowerSync
4052

4153
In addition to this we'll also install [`@powersync/react`](https://www.npmjs.com/package/@powersync/react), which provides several hooks and providers for easier integration.
4254

43-
```shell
55+
<CodeGroup>
56+
57+
```shell npm
58+
npm install @powersync/web @journeyapps/wa-sqlite @powersync/react
59+
```
60+
61+
```shell yarn
62+
yarn add @powersync/web @journeyapps/wa-sqlite @powersync/react
63+
```
64+
65+
```shell pnpm
4466
pnpm install @powersync/web @journeyapps/wa-sqlite @powersync/react
4567
```
4668

69+
</CodeGroup>
70+
4771
<Note>This SDK currently requires [@journeyapps/wa-sqlite](https://www.npmjs.com/package/@journeyapps/wa-sqlite) as a peer dependency.</Note>
4872

4973
## Next.js Config Setup

0 commit comments

Comments
 (0)