release: WRNexusJS 0.8.0
This commit is contained in:
@@ -5,7 +5,25 @@ interface BuildReport {
|
||||
frameworkVersion: string;
|
||||
generatedAt: string;
|
||||
adapter: string;
|
||||
routes: Array<{ path: string; source: string; sourceBytes: number; dynamicParams: string[] }>;
|
||||
routes: Array<{
|
||||
path: string;
|
||||
source: string;
|
||||
sourceBytes: number;
|
||||
dynamicParams: string[];
|
||||
optimization?: {
|
||||
staticNodes: number;
|
||||
reactiveRegions: number;
|
||||
eliminatedBranches: number;
|
||||
unusedState: string[];
|
||||
unusedHandlers: string[];
|
||||
constantProps: string[];
|
||||
unusedLocalCssClasses: string[];
|
||||
batchableStateUpdates: number;
|
||||
memoizableComponents: string[];
|
||||
preloadDependencies: string[];
|
||||
serverOnlyModules: string[];
|
||||
};
|
||||
}>;
|
||||
assets: Array<{ file: string; bytes: number }>;
|
||||
measurements: Record<string, number>;
|
||||
budgetViolations: Array<{ metric: string; budget: number; actual: number; overBy: number }>;
|
||||
@@ -42,6 +60,21 @@ export function runAnalyze(appRoot: string, args: string[]): boolean {
|
||||
for (const asset of report.assets.slice(0, 12)) {
|
||||
console.log(` ${bytes(asset.bytes).padStart(10)} ${asset.file}`);
|
||||
}
|
||||
console.log("\nCompiler optimizations:");
|
||||
for (const route of report.routes.filter((item) => item.optimization)) {
|
||||
const optimization = route.optimization!;
|
||||
console.log(
|
||||
` ${route.path}: ${optimization.staticNodes} static nodes, ${optimization.reactiveRegions} reactive regions, ${optimization.eliminatedBranches} branches removed`,
|
||||
);
|
||||
if (
|
||||
optimization.unusedState.length ||
|
||||
optimization.unusedHandlers.length ||
|
||||
optimization.unusedLocalCssClasses.length
|
||||
)
|
||||
console.log(
|
||||
` candidates: ${[...optimization.unusedState, ...optimization.unusedHandlers, ...optimization.unusedLocalCssClasses].join(", ")}`,
|
||||
);
|
||||
}
|
||||
if (report.budgetViolations.length) {
|
||||
console.log("\nBudget violations:");
|
||||
for (const violation of report.budgetViolations) {
|
||||
|
||||
Reference in New Issue
Block a user