# Upgrading

How to move an existing project to a newer version of the Board Web SDK. The SDK is the `@board.fun/web-sdk` package, and the packaging tool is `web-pack`; both update through your package manager.

## Steps

1. **Review the [Changelog](https://docs.dev.board.fun/web/changelog).** Read the entries between your current version and the latest. Pay attention to **Changed** and **Removed**, those are where code-level migration is needed.

2. **Update the package.** Bump `@board.fun/web-sdk` to the latest version:

```
    npm install @board.fun/web-sdk@latest
```

If you use the packaging tool, update it too:

```
    npm install --save-dev @board/web-pack@latest
```

3. **Rebuild and repack.** Build your app and repack it. Your `board.config.json` already holds the app’s `appId`, so the repacked app keeps the same identity and existing saves stay associated.

```
    vite build
    web-pack dist --package-id fun.board.mygame --name "My Game"
```

4. **Reinstall.** Push the new package to the device with `board-connect`:

```
    board-connect install <appId>.webapp.zip --launch
```

See [Build & Deploy](https://docs.dev.board.fun/web/getting-started/build-and-deploy) for the full deploy loop.

## Keep board.config.json under version control

The `appId` in `board.config.json` is what ties your app to its saved games on the device. Committing the file means upgrades and rebuilds reuse the same `appId`, so saves survive across versions. If the file is lost, the device treats the rebuilt app as new and the old saves are no longer associated with it.

## Next steps

- [Installation](https://docs.dev.board.fun/web/getting-started/quick-start): a clean install from scratch.
- [Build & Deploy](https://docs.dev.board.fun/web/getting-started/build-and-deploy): the full build, pack, and deploy loop.
