Skip to content

Commit

Permalink
Mention vite in prerequisites
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Rey committed Aug 13, 2024
1 parent 1b477d3 commit 895637a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/build/web3/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,32 @@ n latest
:::

Once you have an up-to-date Node.js, you're ready to start developing smart contracts on the Massa blockchain.

## Using a Bundler for Vanilla JavaScript Projects

As the Massa Web3 library doesn't provide a pre-bundled version, it's recommended to use a bundler when working with vanilla JavaScript projects. This approach ensures proper module resolution and allows you to take full advantage of the library's features.

We recommend using [Vite](https://vitejs.dev/) as a fast and efficient bundler for your projects. Here's how you can set up a new project with Vite:

1. Create a new project directory and navigate into it:

```shell
npm create vite@latest
```

2. Choose the `vanilla` template when prompted.

3. Install the Massa Web3 library:
```shell
npm install @massalabs/wallet-provider
```
and/or
```shell
npm install @massalabs/massa-web3
```

This setup allows you to use the Massa Web3 library in a vanilla JavaScript project with proper bundling and module resolution.

:::note
Using a bundler like Vite not only resolves module dependencies but also provides features like hot module replacement and optimized builds for production, enhancing your development experience with the Massa Web3 library.
:::

0 comments on commit 895637a

Please sign in to comment.