@traceletdev/next
v0.6.1
Published
Tracelet plugin for Next.js - automatically collects route statistics after builds
Maintainers
Readme
@traceletdev/next
Tracelet plugin for Next.js projects.
Installation
npm install -D @traceletdev/cli @traceletdev/nextUsage
After installing, add a postbuild script to your package.json:
{
"scripts": {
"postbuild": "tracelet-next collect"
}
}Or run manually after building:
npm run build
npx tracelet-next collectThis will generate .tracelet/stats.json which is used by tracelet lint to check performance budgets.
How it works
The plugin reads Next.js build manifests (.next/build-manifest.json, .next/app-build-manifest.json, etc.) to:
- Detect all routes (including dynamic routes)
- Calculate gzip-compressed JavaScript sizes per route
- Identify third-party JavaScript bundles
- Generate statistics for tracelet linting
Configuration
Ensure you have a tracelet.config.json file in your project root. See the main tracelet documentation for configuration options.
