Merge pull request #16607 from benja-M-1/extensions/fix-port

Fix wrong port number since vite migration
This commit is contained in:
Sebastiaan van Stijn 2023-01-27 13:08:59 +01:00 committed by GitHub
commit 756f3b5dd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.