@forgedock/fd-fastest-analyzer-next
v1.0.2
Published
Next.js build analyzer with advanced module-level insights
Downloads
11
Maintainers
Readme
@fd-fastest/analyzer-next
Advanced Next.js bundle analyzer used by the FD-Fastest CLI.
Features
- Route-level bundle sizing with gzip measurements.
- Module breakdown sourced from emitted source maps.
- Duplicate module detection across shared bundles.
- Dependency graph generation for quick visualization.
- Bundle composition summary highlighting framework, vendor, and app code.
- Turbopack manifest support for projects using Next.js' new bundler.
Usage
import { analyzeNextBuild } from '@fd-fastest/analyzer-next';
import { createLogger } from '@fd-fastest/logger';
const logger = createLogger({ name: 'analyzer-example' });
const results = await analyzeNextBuild('.next', {
advanced: true,
detectDuplicates: true,
generateGraph: true,
analyzeComposition: true,
turbopackBundleAnalysis: true,
});
logger.info('Route analysis', {
route: results[0]?.path,
modules: results[0]?.modules,
});All advanced capabilities are opt-in and require source maps to be present in the Next.js build output. Turbopack support is on by default and falls back to webpack manifests when .next/turbopack is absent; set turbopackBundleAnalysis: false to disable the automatic detection.
