ai-debug-local-mcp
Version:
🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh
70 lines • 2.19 kB
TypeScript
import { Page } from 'playwright';
export interface NextJSBundleAnalysis {
firstLoadJS: Record<string, number>;
totalBundleSize: number;
unusedDependencies: string[];
codeSplitting: {
effectiveness: number;
sharedChunks: string[];
routeChunks: Record<string, string[]>;
};
}
export interface BundlePerformanceAnalysis {
score: number;
issues: string[];
recommendations: string[];
metrics: {
avgFirstLoadSize: number;
largestRoute: {
route: string;
size: number;
};
sharedCodeRatio: number;
};
}
export interface BundleReport {
summary: string;
bundle: NextJSBundleAnalysis;
performance: BundlePerformanceAnalysis;
suggestions: string[];
}
/**
* NextJSBundleAnalyzer - Analyzes Next.js bundle structure and performance
*
* This module handles:
* - Bundle size analysis per route
* - Code splitting effectiveness measurement
* - Unused dependency detection
* - Performance optimization recommendations
* - Comprehensive bundle reporting
*/
export declare class NextJSBundleAnalyzer {
/**
* Analyze the complete bundle structure of a Next.js application
*/
analyzeBundleStructure(page: Page): Promise<NextJSBundleAnalysis>;
/**
* Detect unused dependencies by comparing package.json with actual bundle usage
*/
detectUnusedDependencies(page: Page): Promise<string[]>;
/**
* Analyze bundle performance and identify issues
*/
analyzePerformance(bundleData: NextJSBundleAnalysis): BundlePerformanceAnalysis;
/**
* Get specific optimization suggestions based on bundle analysis
*/
getOptimizationSuggestions(bundleData: NextJSBundleAnalysis): string[];
/**
* Generate a comprehensive bundle analysis report
*/
generateReport(page: Page): Promise<BundleReport>;
/**
* Compare bundle metrics against Next.js performance baselines
*/
compareAgainstBaselines(bundleData: NextJSBundleAnalysis): {
status: 'excellent' | 'good' | 'needs-improvement' | 'poor';
details: string[];
};
}
//# sourceMappingURL=nextjs-bundle-analyzer.d.ts.map