You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure you are using the `[email protected]` , `nuxt@^3.8.1`, `typescript@^5.0.4` versions.
@@ -37,7 +37,7 @@ Make sure you are using the `[email protected]` , `nuxt@^3.8.1`, `typescript@^5.0.4`
37
37
One of the main dependencies for any crypto-related decentralized application is Buffer. To make sure we add Buffer to our project, we can install it as a dependency and then make a Nuxt plugin to import it to the global/window object:
If you are going to use `pinia` as state management, add it to your packages:
56
56
57
57
```bash
58
-
$ yarn add @pinia/nuxt@^0.4.9
58
+
$ pnpm install @pinia/nuxt@^0.4.9
59
59
```
60
60
61
61
### 5. Using `vueuse`
@@ -173,4 +173,4 @@ There is one optimization that you can to decrease the bundle size - add these r
173
173
174
174
### 7. Booting our app
175
175
176
-
Finally, you can start your app locally using `yarn dev` or generate static pages using `yarn generate` which you can deploy to any static page hosting like Netlify, Vercel, etc.
176
+
Finally, you can start your app locally using `pnpm dev` or generate static pages using `pnpm generate` which you can deploy to any static page hosting like Netlify, Vercel, etc.
Finally, make sure to import the `buffer` in your `main.tsx` on top of the file
45
45
46
46
```typescript
47
-
import { Buffer } from"buffer";
47
+
import { Buffer } from'buffer'
48
48
49
49
if (!window.Buffer) {
50
-
window.Buffer=Buffer;// Optional, for packages expecting Buffer to be global
50
+
window.Buffer=Buffer// Optional, for packages expecting Buffer to be global
51
51
}
52
52
```
53
53
@@ -56,7 +56,7 @@ if (!window.Buffer) {
56
56
React has a lot of different state managers, pick the one you are going to use and install it. You can use the build in `Context API` for state management without the need to install a third-party solution. The preferred third-party state managers are `Redux` and `Zustand`.
57
57
58
58
```bash
59
-
$ yarn add zustand
59
+
$ pnpm install zustand
60
60
```
61
61
62
62
### 5. vite.config.ts
@@ -68,28 +68,28 @@ Open up `vite.config.ts` and add `node-polyfills` inside the `plugins` array.
Finally, you can start your app locally using `yarn dev` or build for production using `yarn build` which you can deploy to any static page hosting like Netlify, Vercel, etc.
95
+
Finally, you can start your app locally using `pnpm dev` or build for production using `pnpm build` which you can deploy to any static page hosting like Netlify, Vercel, etc.
0 commit comments