Fix wrong port number since vite migration

This commit is contained in:
Benjamin Grandfond 2023-01-27 11:06:53 +01:00
parent db7ec17c6d
commit 6dbc5156e7
No known key found for this signature in database
GPG Key ID: 17805DAE79209F37
1 changed files with 5 additions and 3 deletions

View File

@ -26,7 +26,9 @@ After an extension is deployed, it is also possible to open Chrome DevTools from
### Hot reloading whilst developing the UI
During UI development, its helpful to use hot reloading to test your changes without rebuilding your entire extension. To do this, you can configure Docker Desktop to load your UI from a development server, such as the one Create React App starts when invoked with yarn start.
During UI development, its helpful to use hot reloading to test your changes without rebuilding your entire
extension. To do this, you can configure Docker Desktop to load your UI from a development server, such as the one
[Vite](https://vitejs.dev/) starts when invoked with `npm start`.
Assuming your app runs on the default port, start your UI app and then run:
@ -35,12 +37,12 @@ $ cd ui
$ npm run dev
```
This starts a development server that listens on port 5173.
This starts a development server that listens on port 3000.
You can now tell Docker Desktop to use this as the frontend source. In another terminal run:
```console
$ docker extension dev ui-source <name-of-your-extensions> http://localhost:5173
$ docker extension dev ui-source <name-of-your-extensions> http://localhost:3000
```
Close and reopen the Docker Desktop dashboard and go to your extension. All the changes to the frontend code are immediately visible.