> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# @blotch/angular-lynx-build

The Angular CLI builders behind `ng build`, `ng serve`, `ng test` and `ng extract-i18n` on Lynx. It's the only build dependency your app needs, as `@angular/build` is for a web app. [RSpeedy](/guide/glossary.md#rspeedy) (the Lynx build tool), the AngularLynx plugin and the native app builder come with it.

## Usage

`ng add @blotch/angular-lynx` installs it and points your `angular.json` targets at it:

```json title="angular.json"
"architect": {
  "build": {
    "builder": "@blotch/angular-lynx-build:application",
    "options": {
      "browser": "src/main.ts",
      "tsConfig": "tsconfig.app.json"
    }
  },
  "serve": {
    "builder": "@blotch/angular-lynx-build:dev-server"
  },
  "test": {
    "builder": "@blotch/angular-lynx-build:unit-test"
  },
  "extract-i18n": {
    "builder": "@blotch/angular-lynx-build:extract-i18n"
  }
}
```

| Builder        | Command           | What it does                                                                                                  |
| -------------- | ----------------- | ------------------------------------------------------------------------------------------------------------- |
| `application`  | `ng build`        | Builds the [bundles](/guide/glossary.md#bundle) into `dist/`, and with `--platform`, the iOS and Android apps |
| `dev-server`   | `ng serve`        | Serves the app to Lynx Explorer, the web preview and, with `--platform`, a development build of your app      |
| `unit-test`    | `ng test`         | Runs your unit tests with Angular's own unit-test builder, set up for Lynx                                    |
| `extract-i18n` | `ng extract-i18n` | Extracts the messages to translate with Angular's own extractor, set up for Lynx                              |

They work like Angular's builders:

- **Configurations and flags override options**, so `-c development` and `--source-map` work.
- **`optimization` picks the build.** A build that optimizes scripts is a production build. Any other build is a development build, with dev mode on. There's no `mode` option.
- **`ng build`'s bundles load their images from where they're deployed**, in a development build too: from inside the app, or from your server with RSpeedy's `output.assetPrefix`. Only `ng serve` loads them from its dev server.

## application

`ng build` compiles your app into bundles, the files the Lynx engine runs. For a walkthrough, see [Build your app](/guide/building-for-production.md).

### Build options

| Option                  | Type                                | Default                  | Description                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------- | ----------------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `platform`              | `"ios"` \| `"android"` \| `"all"`   | —                        | Also build the native apps into `dist/<platform>/`. Builds only the `lynx` environment                                                                                                                                                                                                                                                                                 |
| `run`                   | `boolean`                           | `false`                  | With `platform`, install the app on a simulator, emulator or phone and open it. See [Run the app](/guide/native-apps/index.md#run-the-app)                                                                                                                                                                                                                             |
| `device`                | `string`                            | —                        | With `run`, where: a simulator's or a paired iPhone's name or UDID, or a virtual device's name or adb serial. An iPhone needs `ios.teamId`: see [Run on a real iPhone](/guide/native-apps/devices.md#run-on-a-real-iphone)                                                                                                                                             |
| `watch`                 | `boolean`                           | `false`                  | Rebuild the bundles when a file changes. Can't be combined with `platform`                                                                                                                                                                                                                                                                                             |
| `config`                | `string`                            | `lynx.config.ts`, if any | The RSpeedy config file, relative to the project root. `.js`, `.mts` and `.mjs` are found too. See [lynx.config.ts](#lynxconfigts)                                                                                                                                                                                                                                     |
| `environment`           | `string[]`                          | All                      | Only build these RSpeedy environments, e.g. `["lynx"]`. RSpeedy builds `lynx` for iOS and Android, and `web` for the web preview                                                                                                                                                                                                                                       |
| `intl`                  | `string[]`                          | —                        | The `Intl` APIs to add to the iOS and Android bundles, which Lynx lacks, with data for your locales: any of `Collator`, `DateTimeFormat`, `DisplayNames`, `ListFormat`, `NumberFormat`, `PluralRules` and `RelativeTimeFormat`. See [Use `Intl`](/guide/i18n/intl.md)                                                                                                  |
| `intlChecks`            | `"warning"` \| `"error"` \| `"off"` | `"warning"`              | How the build reports code that needs an `Intl` API `intl` doesn't list. `"warning"` prints it and passes, `"error"` fails the build, `"off"` prints nothing. A build with Rsbuild's persistent cache (`performance.buildCache`) isn't checked. See [Use `Intl`](/guide/i18n/intl.md#the-build-tells-you-whats-missing)                                                |
| `multiTouch`            | `boolean`                           | `false`                  | Touch events carry every finger on the screen, as a browser's do (Lynx's `enableMultiTouch` page config), for a pinch of your own: Lynx recognizes none. Taps don't fire while two fingers are down. The web preview carries every finger either way. See [Gestures](/guide/gestures/index.md#limitations)                                                             |
| `backgroundTreeShaking` | `"safe"` \| `"aggressive"`          | `"safe"`                 | `"aggressive"` drops your module-level values that nothing on the background thread reads from its script, which makes it smaller, but a top-level declaration whose value it doesn't read no longer runs there, even when it does something on purpose. See [Shrink the background thread's script](/guide/main-thread/index.md#shrink-the-background-threads-script) |
| `eagerImports`          | `boolean`                           | `false`                  | Compile your `import()`s on the main thread, such as a lazy route's `loadComponent`, as static imports. The main thread's script is smaller, but each module they load then runs when the app starts. `@defer` blocks stay lazy. See [Make the script smaller with `eagerImports`](/guide/building-for-production.md#make-the-script-smaller-with-eagerimports)        |
| `elementChecks`         | `"warning"` \| `"error"` \| `"off"` | `"warning"`              | How Angular's unknown-element and unknown-property errors (NG8001, NG8002) are reported. `"warning"` prints them and the build passes, `"error"` fails the build, as `ng test` does, and `"off"` leaves them out. See [What the build checks](/api/angular-lynx/elements/index.md#what-the-build-checks)                                                               |

### Angular options

These are Angular's own `application` builder options, and they work as they do in a web app:

`browser`, `tsConfig`, `polyfills`, `styles`, `inlineStyleLanguage`, `fileReplacements`, `aot` (default `true`), `sourceMap`, `outputHashing`, `i18nMissingTranslation`

A few work differently on Lynx:

| Option                     | On Lynx                                                                                                                                                                                                                                 |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `browser`                  | The entry point, and RSpeedy's `source.entry` unless `lynx.config.ts` sets one                                                                                                                                                          |
| `optimization`             | Also picks a production build (scripts optimized, the default) or a development build                                                                                                                                                   |
| `budgets`                  | Checked against each entry's bundle (each is its own `initial` budget) and each component stylesheet. The web preview isn't checked                                                                                                     |
| `outputPath`               | Defaults to `dist/`                                                                                                                                                                                                                     |
| `baseHref`                 | The web bundle asks for its images under this path (RSpeedy's `output.assetPrefix` for `web`), since Lynx for Web resolves them against the page. A bundle served under `/shop/` needs `--base-href=/shop/`. The Lynx bundle ignores it |
| `assets`, `scripts`        | Only `ng test` uses them. Bundles load assets through `import`s                                                                                                                                                                         |
| `index`, `extractLicenses` | Accepted so `ng new`'s config stays valid. They do nothing                                                                                                                                                                              |

### Native app options

`ng build --platform` reads these. [Set the app identity](/guide/native-apps/app-identity.md), [Turn on device features](/guide/native-apps/device-features.md), [Permissions](/guide/native-apps/permissions.md) and [Publish to the app stores](/guide/publishing.md) explain how to set them.

| Option               | Type                                     | Default                  | Description                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------- | ---------------------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `appName`            | `string`                                 | The project name         | The name under the app icon                                                                                                                                                                                                                                                                                                                                                  |
| `appId`              | `string`                                 | —                        | The [app ID](/guide/glossary.md#app-id) for both stores, e.g. `com.example.myapp`                                                                                                                                                                                                                                                                                            |
| `version`            | `string`                                 | `package.json`'s version | The version users see, e.g. `1.2.0`                                                                                                                                                                                                                                                                                                                                          |
| `buildNumber`        | `integer` (1 or more)                    | —                        | The store build number. It must increase with every upload                                                                                                                                                                                                                                                                                                                   |
| `orientation`        | `"portrait"` \| `"landscape"` \| `"all"` | `"portrait"`             | The screen orientations the app supports                                                                                                                                                                                                                                                                                                                                     |
| `edgeToEdge`         | `boolean`                                | `true`                   | Draw the page under the status bar and the home indicator, with CSS `env(safe-area-inset-*)` giving the insets. `false` keeps it inside the [safe area](/guide/safe-area.md), with `env()` at 0                                                                                                                                                                              |
| `textScaling`        | `boolean` \| `{ "max": number }`         | `true`                   | Whether the app's text follows the phone's text size ([Dynamic Type](/guide/glossary.md#dynamic-type)): sizes in `rem` grow, `px` doesn't. `false` keeps the default size; `{ "max": 1.6 }` caps it at 1.6 times. See [Follow the phone's text size](/guide/accessibility.md#follow-the-phones-text-size)                                                                    |
| `icon`               | `string`                                 | —                        | A 1024×1024 PNG without transparency, relative to the project root. Android gets it at each density, round and as an [adaptive icon](/guide/native-apps/app-identity.md#the-app-icon)                                                                                                                                                                                        |
| `splash`             | `object`                                 | —                        | The [splash screen](/guide/native-apps/app-identity.md#the-splash-screen): `image` (a PNG with transparency, drawn centered), `imageWidth` (its width in points and dp, needed with `image`), `backgroundColor` (`#RRGGBB` or `#RGB`, also behind the app) and `dark` (an `image` and a `backgroundColor` for dark mode)                                                     |
| `permissions`        | `object`                                 | —                        | The reason shown for each permission the app uses: `camera`, `microphone`, `location`, `locationAlways`, `photos`, `savePhotos`, `contacts`, `notifications`, `localNetwork`, `biometrics`, `bluetooth`, `tracking`, `nfc`. Most also turn on a feature: see [Permissions](/guide/native-apps/permissions.md)                                                                |
| `filePicker`         | `boolean`                                | `false`                  | Let the person pick documents and save files with [`LynxFilePicker`](/api/angular-lynx/media/file-picker.md). `false` leaves its native code out of both apps                                                                                                                                                                                                                |
| `fileSharing`        | `boolean`                                | `false`                  | List the app's Documents folder in the iOS Files app, under On My iPhone (`UIFileSharingEnabled`), where `LynxFilePicker` can save a file and pick it again. iOS only                                                                                                                                                                                                        |
| `storeReview`        | `boolean`                                | `false`                  | Ask for an App Store or Google Play rating in the app with [`LynxStoreReview`](/api/angular-lynx/accounts/store-review.md). `false` leaves its native code out of both apps                                                                                                                                                                                                  |
| `calendar`           | `boolean`                                | `false`                  | Add events to the person's calendar with [`LynxCalendar`](/api/angular-lynx/media/calendar.md), through the system's event editor, without a calendar permission. `false` leaves its native code out of both apps                                                                                                                                                            |
| `motion`             | `boolean`                                | `false`                  | Read the motion sensors and compass, and hear a shake, with [`LynxMotion`](/api/angular-lynx/hardware/motion.md). Needs no permission. `false` leaves its native code out of both apps                                                                                                                                                                                       |
| `backgroundAudio`    | `boolean`                                | `false`                  | Let [`LynxAudioPlayer`](/api/angular-lynx/hardware/audio-player.md#play-in-the-background) play on in the background and with the phone locked: iOS's `audio` background mode, and an Android media playback service with its notification. `false` still plays while the app is on the screen. App Review rejects the mode in an app that plays nothing in the background   |
| `backgroundLocation` | `boolean`                                | `false`                  | Let [`LynxGeolocation`](/api/angular-lynx/hardware/geolocation.md#follow-the-phone-in-the-background)'s `watchPosition({ background: true })` go on in the background and with the phone locked: iOS's `location` background mode, and an Android location service with its notification. Needs `permissions.location`, and only its "while using the app" permission        |
| `signInWithApple`    | `boolean`                                | `false`                  | Offer Sign in with Apple's native sheet on iOS with [`LynxAppleSignIn`](/api/angular-lynx/accounts/apple-sign-in.md). Adds the `com.apple.developer.applesignin` entitlement, which needs a paid team. `false` leaves it and the native code out of the app                                                                                                                  |
| `wifi`               | `object`                                 | —                        | Read the phone's Wi-Fi network and join others with [`LynxWifi`](/api/angular-lynx/hardware/wifi.md): `{ "join": true, "readCurrentNetwork": true }`. Each part adds an iOS capability (a paid team) and Android permissions, and `readCurrentNetwork` needs `permissions.location`. Without it, no Wi-Fi code ships                                                         |
| `shareTarget`        | `{ "mimeTypes": string[] }` \| `false`   | —                        | Put the app in other apps' share sheets for these MIME types (`text/plain`, `text/uri-list`, `image/*`…), for [`LynxShareTarget`](/api/angular-lynx/sharing/share-target.md). Android gets intent filters; iOS a [Share Extension](/guide/glossary.md#share-extension) and an [App Group](/guide/glossary.md#app-group), which needs a paid team. Left out, none of it ships |
| `deepLinkSchemes`    | `string[]`                               | —                        | URL schemes that open the app, e.g. `["myapp"]`. `myapp://orders/42` opens it on the `/orders/42` route. See [Open the app from a link](/guide/deep-links.md)                                                                                                                                                                                                                |
| `appLinkDomains`     | `string[]`                               | —                        | Your websites whose `https://` links open the app (Universal Links, App Links), e.g. `["example.com", "*.example.com"]`. The build writes the file each site serves. See [Open the app from your website's links](/guide/deep-links.md#open-the-app-from-your-websites-links)                                                                                                |
| `canOpenURLSchemes`  | `string[]`                               | —                        | Other apps' URL schemes [`LynxLinking.canOpenURL()`](/api/angular-lynx/sharing/linking.md#lynxlinkingcanopenurl) asks about, e.g. `["whatsapp"]`. `http`, `https`, `mailto`, `tel` and `sms` are always there                                                                                                                                                                |
| `nativePlugins`      | `object[]`                               | —                        | The app's [native plugins](/guide/native-plugins/index.md): each a `path` to its folder, with `ios` and `android` objects: `sourceDir`, `modules`, `elements`, and on Android `packageName`, `resDir`, `dependencies` and `repositories`. See [The keys](/guide/native-plugins/index.md#the-keys)                                                                            |
| `shortcuts`          | `object[]`                               | —                        | Things the app does that Siri, Spotlight and the Shortcuts app offer on iOS, and the app icon's menu on Android: each has an `id` and a `title`, and may have `phrases`, a `route` and a `symbol`. See [`LynxShortcuts`](/api/angular-lynx/sharing/shortcuts.md#the-shortcuts-option)                                                                                        |
| `ios`                | `object`                                 | —                        | `teamId`: your Apple Developer team ID, which alone signs the builds `--run --device` installs on an iPhone. `export`: how the `.ipa` is signed, `"app-store-connect"` (the default once `signing` is set) or `"release-testing"` (ad hoc). `signing`: see below                                                                                                             |
| `android`            | `object`                                 | —                        | `signing`: see below. `adaptiveIcon`: the adaptive icon's `foreground` (a 1024×1024 PNG) and `background` (a color or a PNG)                                                                                                                                                                                                                                                 |

The signing fields name environment variables, so no secret goes in `angular.json`. See [signing](/guide/glossary.md#signing).

| Field                              | Holds                                                   |
| ---------------------------------- | ------------------------------------------------------- |
| `ios.signing.keyIdEnv`             | The App Store Connect API key's ID                      |
| `ios.signing.issuerIdEnv`          | The API key's issuer ID                                 |
| `ios.signing.keyPathEnv`           | The path to the API key file                            |
| `android.signing.storeFileEnv`     | The path to the upload keystore                         |
| `android.signing.storePasswordEnv` | The keystore's password                                 |
| `android.signing.keyAlias`         | The key's alias (the value itself, not a variable name) |
| `android.signing.keyPasswordEnv`   | The key's password                                      |

## dev-server

`ng serve` runs RSpeedy's dev server. Lynx Explorer and the web preview load your app from it. With `--platform`, so does a development build of your app, which it opens on a simulator, emulator or phone (see [Develop in the real app](/guide/native-apps/devices.md#develop-in-the-real-app-with-ng-serve)).

| Option        | Type                   | Default                           | Description                                                                                                                                                                                                |
| ------------- | ---------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `buildTarget` | `string`               | The project's `build:development` | The build target to serve, as `project:target[:configuration]`. Its options configure the build                                                                                                            |
| `port`        | `number`               | RSpeedy's (3000)                  | The port to serve on. Overrides `server.port` in `lynx.config.ts`. The `PORT` environment variable, when it's a number, overrides it, as in Angular's dev server                                           |
| `host`        | `string`               | RSpeedy's                         | The host to listen on. Overrides `server.host` in `lynx.config.ts`                                                                                                                                         |
| `environment` | `string[]`             | The build target's, or all        | Only build these RSpeedy environments                                                                                                                                                                      |
| `platform`    | `"ios"` \| `"android"` | —                                 | Also build the app's development build from the build target's native options and open it where `ng build --run` would. It loads from the dev server and updates on every save. Its native build is cached |
| `device`      | `string`               | A running one, else a new one     | With `platform`, where to open the app: a simulator's, paired iPhone's or virtual device's name, a UDID or an adb serial                                                                                   |

**When the port is taken**, `ng serve` does what Angular's dev server does. That holds wherever the port came from: `PORT`, `--port`, `lynx.config.ts` or the default.

- **In a terminal**, it asks whether to use a different port.

- **Anywhere else** (CI, a script), it fails:

  ```text
  Port 3000 is already in use. Use '--port' to specify a different port.
  ```

- **`PORT=0`**, or `--port 0` when `PORT` isn't set, lets the system pick a port.

- **It never moves to the next free port**, as `rspeedy dev` does. A proxy, a script or `adb reverse` set up for the port would miss a server that moved, without a word.

- **`server.strictPort` in `lynx.config.ts` doesn't change this.** Rsbuild, which RSpeedy runs on, fills in its default `strictPort: false` before `ng serve` sees the config, so the two can't be told apart. Choose another port with `--port`.

## unit-test

`ng test` runs Angular's `@angular/build:unit-test` builder with Vitest. It takes the [same options](https://angular.dev/cli/test) (`include`, `watch`, `coverage`, `setupFiles`, `providersFile`, ...). `include` defaults to both `**/*.spec.ts` and `**/*.test.ts`.

For Lynx, it also:

- defines the compile-time flags the AngularLynx runtime reads;
- loads the setup of `@blotch/angular-lynx-testing-library` when your project has it, so `render()` works without a setup file;
- loads both after your polyfills. Those are the build target's `polyfills`, unless the `test` target has its own `polyfills` (Angular 22.3 added the option). The tests then load that list in place of the app's, and `"polyfills": []` loads none of them;
- loads imported images, fonts and media as file URLs, as RSpeedy does in the app.

It runs your project's own `@angular/build`, which must match your Angular version. See [Testing](/guide/testing/index.md) for writing tests.

## extract-i18n

`ng extract-i18n` runs Angular's `@angular/build:extract-i18n` builder. It takes the [same options](https://angular.dev/cli/extract-i18n) (`format`, `outputPath`, `outFile`, ...). Angular CLI picks an extractor by itself only for Angular's own build builders, so an AngularLynx app needs this target in `angular.json`. `ng add` writes it, and [`add-i18n`](/api/schematics.md#add-i18n) sets it to write JSON to `src/locale`.

For Lynx, it also loads imported images, fonts and media as file URLs, as in `ng test`. Angular's extractor stops at the first imported image otherwise.

It needs `@angular/localize`, which `add-i18n` installs. See [Internationalization](/guide/i18n/index.md).

## lynx.config.ts

**Your app doesn't need one.** Without it, the builders configure RSpeedy from `angular.json`:

| RSpeedy setting | Comes from                                                                  |
| --------------- | --------------------------------------------------------------------------- |
| `source.entry`  | The build target's `browser` option                                         |
| `environments`  | `lynx` (iOS and Android) and `web` (the web preview)                        |
| `mode`          | The build target's `optimization`                                           |
| `plugins`       | `pluginAngularLynx()`, plus the Lynx Explorer QR code plugin for `ng serve` |

Add a `lynx.config.ts` to the project root to change anything else RSpeedy supports, or to pass the AngularLynx plugin options. Your settings replace the defaults above, except `mode`, which always follows `optimization`.

```typescript title="lynx.config.ts"
import { defineConfig, pluginAngularLynx } from '@blotch/angular-lynx-build';

export default defineConfig({
  plugins: [pluginAngularLynx({ enableCSSInheritance: true })],
});
```

The builders use the plugin you list instead of adding their own. Import from `@blotch/angular-lynx-build`, not `@lynx-js/rspeedy` or `@blotch/rsbuild-plugin-angular-lynx`. Those are its dependencies, not your app's, so strict package managers (pnpm, Yarn PnP) can't resolve them.

### Plugin options

`pluginAngularLynx()` compiles Angular for Lynx. All of its options are optional.

**Build**

| Option                      | Type                                | Default  | Description                                                                                                                                                                                                                                      |
| --------------------------- | ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `pages`                     | `string[]` \| `'all'`               | —        | Build these `angular.json` projects as separate pages, each with its own bundle. `'all'` builds every `application` project. See [Multi-page apps](/guide/multi-page.md)                                                                         |
| `intl`                      | `string[]`                          | —        | The same as the [`intl` build option](#build-options), for an app whose `angular.json` build target isn't AngularLynx's. Replaces it when set                                                                                                    |
| `intlChecks`                | `'warning'` \| `'error'` \| `'off'` | —        | The same as the [`intlChecks` build option](#build-options), for an app whose `angular.json` build target isn't AngularLynx's. Replaces it when set                                                                                              |
| `enableSSR`                 | `boolean`                           | `false`  | Support Lynx's snapshot SSR, which renders the first screen ahead of time. See the [SSR example](/examples/ssr.md)                                                                                                                               |
| `targetSdkVersion`          | `string`                            | `'3.2'`  | The oldest Lynx engine version the bundle runs on                                                                                                                                                                                                |
| `experimental_isLazyBundle` | `boolean`                           | `false`  | Experimental. Emit each lazy route and `@defer` block as its own lazy bundle, downloaded the first time it's needed. Needs Lynx 3.9 or later. By default, they're built into the main bundle                                                     |
| `debugInfoOutside`          | `boolean`                           | `true`   | Write debug info to a separate file instead of into the bundle, which keeps the bundle smaller                                                                                                                                                   |
| `preferredFps`              | `'high'` \| `'auto'` \| `'low'`     | `'high'` | The frame rate Lynx asks for while it animates. `'high'` lets a ProMotion iPhone animate at 120 fps. `'auto'`, Lynx's own default, leaves an iPhone at 60 fps, and `'low'` animates at 30 at most. Android draws at the screen's rate either way |
| `multiTouch`                | `boolean`                           | —        | The same as the [`multiTouch` build option](#build-options), for an app whose `angular.json` build target isn't AngularLynx's. Replaces it when set                                                                                              |
| `backgroundTreeShaking`     | `'safe'` \| `'aggressive'`          | —        | The same as the [`backgroundTreeShaking` build option](#build-options), for an app whose `angular.json` build target isn't AngularLynx's. Replaces it when set                                                                                   |
| `eagerImports`              | `boolean`                           | —        | The same as the [`eagerImports` build option](#build-options), for an app whose `angular.json` build target isn't AngularLynx's. Replaces it when set. Has no effect with `experimental_isLazyBundle`                                            |
| `elementChecks`             | `'warning'` \| `'error'` \| `'off'` | —        | The same as the [`elementChecks` build option](#build-options), for an app whose `angular.json` build target isn't AngularLynx's. Replaces it when set                                                                                           |

**CSS**

| Option                          | Type       | Default         | Description                                                                                                                                                                                                                                                                                                |
| ------------------------------- | ---------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enableCSSSelector`             | `boolean`  | `true`          | Match CSS selectors in the Lynx engine. Component styles need it                                                                                                                                                                                                                                           |
| `enableCSSInheritance`          | `boolean`  | `true`          | Text properties inherit from parents, as on the web. By default only `font-size` does (see `customCSSInheritanceList`), so a `<text>` without a size takes its parent's. `true` without a list inherits `color`, `line-height` and the rest. `false` inherits nothing: that `<text>` takes the page's size |
| `customCSSInheritanceList`      | `string[]` | `['font-size']` | Inherit only these properties. The default list applies unless you pass `enableCSSInheritance: true` without a list, which inherits Lynx's whole list                                                                                                                                                      |
| `enableCSSInvalidation`         | `boolean`  | `true`          | Restyle what combinator selectors such as `.dark .title` match when a class changes, as on the web. With `false`, they only match when an element's classes are set, which saves some work, and `dark:` classes don't follow an appearance change                                                          |
| `defaultDisplayLinear`          | `boolean`  | `true`          | Give elements Lynx's `display: linear` unless they set `display`. With `false`, `flex` is the default                                                                                                                                                                                                      |
| `defaultOverflowVisible`        | `boolean`  | `true`          | Let elements draw outside their bounds unless they set `overflow`, as on the web. With `false`, elements clip their children by default, Lynx's older behavior                                                                                                                                             |
| `enableRemoveCSSScope`          | `boolean`  | `false`         | Stop scoping CSS to the components that import it, so every rule applies app-wide                                                                                                                                                                                                                          |
| `removeDescendantSelectorScope` | `boolean`  | `false`         | Let descendant selectors match across CSS scopes                                                                                                                                                                                                                                                           |

**Gestures and accessibility**

| Option                       | Type      | Default | Description                                                                                                                                              |
| ---------------------------- | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enableNewGesture`           | `boolean` | `true`  | Turn on Lynx's gesture system. [Gestures](/api/gestures/index.md) silently don't fire without it                                                         |
| `enableA11y`                 | `boolean` | `true`  | Use Android's own accessibility views while a screen reader is on. Set it to `false` so UI test tools such as Maestro and Appium always see the elements |
| `enableAccessibilityElement` | `boolean` | `false` | Make every element an accessibility element by default, as if it set `accessibility-element`                                                             |

**Deprecated**

`enableICU`, `enableParallelElement` and `pipelineSchedulerConfig` have no effect, and never did: the plugin never passed them to Lynx, and Lynx's own build plugin no longer takes them. The build warns when your config sets one. Remove them; a future release drops them.

### Without the Angular CLI

To run RSpeedy yourself, install `@blotch/rsbuild-plugin-angular-lynx` and import the plugin from there. Nothing adds it for you, so list it in `lynx.config.ts` and set `source.entry`.

## Exports

| Export                                         | Kind           | Description                                                                                                      |
| ---------------------------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------- |
| `pluginAngularLynx`                            | Function       | Creates the AngularLynx plugin. Takes the [plugin options](#plugin-options)                                      |
| `PluginAngularLynxOptions`                     | Type           | The plugin options                                                                                               |
| `PreferredFps`                                 | Type           | The values of the `preferredFps` option                                                                          |
| `defineConfig`                                 | Function       | RSpeedy's config helper, for `lynx.config.ts`                                                                    |
| `Config`                                       | Type           | RSpeedy's config type                                                                                            |
| `pluginAngularCliContext`, `AngularCliContext` | Function, type | How the builders pass `angular.json`'s options to the plugin. Apps don't need them                               |
| `/client`                                      | Types          | Types for asset and CSS module imports and `import.meta.env`. `ng add` references them in `src/rspeedy-env.d.ts` |

## Related

- [Build your app](/guide/building-for-production.md)
- [Run on iOS and Android](/guide/native-apps/index.md)
- [Schematics](/api/schematics.md)
