diff --git a/articles/static-web-apps/add-api.md b/articles/static-web-apps/add-api.md index 4d32da0f61f3..3c2e51f2ccc7 100644 --- a/articles/static-web-apps/add-api.md +++ b/articles/static-web-apps/add-api.md @@ -279,6 +279,15 @@ npm install npm run build ``` +# [React (Vite)](#tab/react-vite) + +Install npm dependencies and build the app into the _dist_ folder. + +```bash +npm install +npm run dist +``` + # [Vue](#tab/vue) Install npm dependencies and build the app into the _dist_ folder. @@ -319,6 +328,13 @@ Run the frontend app and API together by starting the app with the Static Web Ap ```bash swa start build --api-location api ``` + # [React (Vite)](#tab/react-vite) + + Pass the build output folder (`dist`) and the API folder (`api`) to the CLI. + + ```bash + swa start dist --api-location api + ``` # [Vue](#tab/vue)