Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
3f77cd59 fix(nx-dev): fix double-counting and exclude assets from page tracking (#34286)
## Current Behavior
1. **track-asset-requests** runs twice per request due to redundant path
patterns:
```typescript
path: ["/*.txt", "/**/*.txt", "/*.md", "/**/*.md"]
```
The `/**/*` pattern already matches root level files, so `/*` is
redundant.
2. **track-page-requests** runs on many asset requests even though it
only tracks HTML page views:
- Font files: `/docs/fonts/*.woff2`, `/docs/*.woff`
- Images: `/docs/*.svg`, `/docs/*.png`, `/docs/og/*`
- Pagefind search index: `/docs/pagefind/*`
## Expected Behavior
1. Asset tracking should fire only once per request
2. Page tracking should exclude all non-HTML assets at Netlify level
(zero compute)
## Changes
### track-asset-requests.ts
Simplified path patterns:
```typescript
path: ["/**/*.txt", "/**/*.md"]
```
### track-page-requests.ts
Added comprehensive exclusions:
| Category | Exclusions |
|----------|------------|
| Images | `.svg`, `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.ico`,
`/images/*`, `/og/*` |
| Fonts | `/fonts/*`, `.woff`, `.woff2` |
| Search | `/pagefind/*` |
## Related Issue(s)
Fixes DOC-395