# React External App

React external app template — authentication, global search, and site container for Experience Cloud.

## In this monorepo

This package is a **template app** in the webapps monorepo. It is built by applying feature patches to the base React app; the output is written to `dist/`.

### Build

```bash
nx run reactexternalapp:build
```

Produces an SFDX project in `dist/` with the web app at `dist/force-app/main/default/webapplications/reactexternalapp/`.

### Dev server

```bash
nx run reactexternalapp:dev
```

Starts the Vite dev server from the built output in `dist/`.

### Watch

```bash
nx run reactexternalapp:watch
```

Re-applies patches automatically when source files change.

### Test

This package has no dedicated test target. To run tests, build first, then run them from the built web app:

```bash
nx run reactexternalapp:build
cd dist/force-app/main/default/webapplications/reactexternalapp && npm install && npm test
```

### Clean

```bash
npm run clean
```

Removes the `dist/` directory.

---

For standalone run, deploy, and test instructions (e.g. after publishing or extracting `dist/`), see the [web app README](dist/force-app/main/default/webapplications/reactexternalapp/README.md).
