> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups.md).

# Framework and Bundler Setups

Complete setups for the most common front-end stacks. Each page shows the source map configuration, the output folder to scan, whether the output is ES modules, and the exact `slnodejs` commands.

| Stack                                            | Bundler             | Output to scan                             | ES module output (`--es6Modules`)          | Page                                                                                                                                                                                                        |
| ------------------------------------------------ | ------------------- | ------------------------------------------ | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Angular 17+ (application builder)                | esbuild             | `dist/<project>/browser`                   | Yes                                        | [Angular](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/angular.md)                                                           |
| Angular 8–16 (browser builder)                   | webpack             | `dist/<project>`                           | No (Angular 8–12 also emits `-es5` copies) | [Angular](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/angular.md)                                                           |
| React with Vite                                  | Vite (Rollup)       | `dist`                                     | Yes                                        | [React](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/react.md)                                                               |
| React with Create React App                      | webpack             | `build`                                    | No                                         | [React](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/react.md)                                                               |
| Vue 3 with Vite                                  | Vite                | `dist`                                     | Yes                                        | [Vue](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/vue.md)                                                                   |
| Vue with Vue CLI                                 | webpack             | `dist`                                     | No                                         | [Vue](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/vue.md)                                                                   |
| Svelte, Solid, Preact, Lit or plain JS with Vite | Vite                | `dist`                                     | Yes                                        | [Vite](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/vite.md)                                                                 |
| Any app with a custom webpack config             | webpack 5           | `output.path`                              | Only with `output.module`                  | [webpack](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/webpack.md)                                                           |
| Any app built with esbuild                       | esbuild             | `outdir`                                   | With `--format=esm`                        | [esbuild](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/esbuild.md)                                                           |
| Any app built with Rsbuild or Rspack             | Rspack              | `dist`                                     | No (default)                               | [Rsbuild and Rspack](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/rsbuild-and-rspack.md)                                     |
| Libraries and apps built with Rollup             | Rollup              | `output.dir`                               | With `format: 'es'`                        | [Rollup](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/rollup.md)                                                             |
| Micro-frontends, Module Federation               | any                 | each app's output                          | per app                                    | [Micro-frontends](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups/micro-frontends.md)                                           |
| Next.js                                          | webpack / Turbopack | `.next/static` (client) + `.next` (server) | Yes                                        | [Next.js](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/node.js-agent/advanced-features/next.js-with-sealights-node-and-browser-agents-multi-module-scan.md) |

## What every setup has in common <a href="#common" id="common"></a>

1. **Source maps with column information, next to the bundles at scan time.** `slnodejs` finds a source map from an inline map, from the `sourceMappingURL` comment, or from a file named `<bundle>.js.map` in the same folder. "Hidden" source maps (no comment) therefore work, as long as the `.map` file sits next to the bundle with that name. "Cheap" (line-only) and `eval` source maps do not work.
2. **Scan the build output, not the source folder.** `slnodejs scan --instrumentForBrowsers --outputPath sl_dist` writes the instrumented copy.
3. **`--es6Modules` only when the output is ES modules.** Check: if the page loads the bundles with `<script type="module">`, or the bundles contain top-level `import` / `export` statements, add it. Without it, ES module bundles produce the dashboard warning `File '<file>' parsed to AST with the following error(s): ...`.
4. **Deploy `sl_dist` instead of the build output, to test environments only.**
5. **Framework code is not instrumented.** By default, `slnodejs` skips Angular, React, Vue, Svelte, Stencil, `core-js` and `regenerator-runtime` code inside your bundles (as resolved from source maps). To skip more packages, create a `.slignore.instrument` file. It **replaces** the built-in list, so copy the entries for your framework into it:

   ```gitignore
   # Angular
   @angular/
   zone.js
   rxjs
   tslib
   # React
   react
   react-dom
   react-is
   scheduler
   prop-types
   # Vue
   vue
   @vue/
   vue-router
   vuex
   pinia
   # Svelte, Stencil
   svelte
   @sveltejs/
   @stencil/core
   # Polyfills
   core-js
   regenerator-runtime
   # Your additions, for example:
   @mui/
   ```

## Scanned file types <a href="#file-types" id="file-types"></a>

By default `slnodejs` scans and instruments `.js`, `.jsx`, `.mjs` and `.es6` files. To change the list, set `SL_fileExtensions` on the scan step, with every extension you need:

| Your output contains                                            | Set                                |
| --------------------------------------------------------------- | ---------------------------------- |
| `.cjs` files                                                    | `SL_fileExtensions=.js,.mjs,.cjs`  |
| Inline `<script>` blocks in `.html` pages that you want covered | `SL_fileExtensions=.js,.mjs,.html` |
| Inline scripts in FreeMarker templates                          | `SL_fileExtensions=.js,.ftl`       |

## Before you run it in CI <a href="#before-ci" id="before-ci"></a>

Check the scan locally with `dryRun`, which shows the included files and how source maps resolve:

```bash
npx slnodejs dryRun --scanDir dist --verbose --instrumentForBrowsers --tokenFile sltoken.txt
```

Then follow [Setting Up Browser Coverage → Check that it works](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/setting-up-browser-coverage.md#check-that-it-works) after the first deployment. All flags are explained in the [Flags and Settings Guide](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/flags-and-settings-guide.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/browser-agent/framework-setups.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
