@@ -122,23 +122,6 @@ export function formatNodeLabel(node: BundleStatsNode): string {
122122 return `${ icon } ${ displayName } ${ sizeInfo } ` ;
123123}
124124
125- /**
126- * Enhanced tree connector that uses appropriate icons
127- */
128- export function formatTreeConnector (
129- node : BundleStatsNode ,
130- isLast : boolean ,
131- ) : string {
132- const baseConnector = isLast ? '└─ ' : '├─ ' ;
133-
134- if ( node . values . type === 'import' ) {
135- const arrow = node . values . importKind === 'dynamic' ? '▷' : '▶' ;
136- return `${ baseConnector } ${ arrow } ` ;
137- }
138-
139- return baseConnector ;
140- }
141-
142125export const short = ( p : string ) : string =>
143126 truncateText ( ( p || '' ) . replace ( process . cwd ( ) , '⟨CWD⟩' ) , { maxChars : 80 } ) ;
144127
@@ -214,18 +197,34 @@ export function getNodeIconAndPrefix(
214197
215198 switch ( node . values . type ) {
216199 case 'chunk' :
200+ if ( node . values . path ?. endsWith ( '.css' ) || node . name . endsWith ( '.css' ) ) {
201+ return { icon : '🎨' , prefix : '' } ;
202+ }
217203 return { icon : '📄' , prefix : '' } ;
218204 case 'import' :
219- const arrow = node . values . importKind === 'dynamic' ? '▷' : '▶' ;
220- return { icon : arrow , prefix : 'imported from ' } ;
205+ if ( node . values . path ?. endsWith ( '.css' ) || node . name . endsWith ( '.css' ) ) {
206+ return { icon : '🎨' , prefix : '' } ;
207+ }
208+ return { icon : '📄' , prefix : '' } ;
221209 case 'input' :
222210 if ( node . values . path ?. endsWith ( '.css' ) || node . name . endsWith ( '.css' ) ) {
223211 return { icon : '🎨' , prefix : '' } ;
224212 }
225213 return { icon : '📄' , prefix : '' } ;
226214 case 'asset' :
215+ if ( node . values . path ?. endsWith ( '.css' ) || node . name . endsWith ( '.css' ) ) {
216+ return { icon : '🎨' , prefix : '' } ;
217+ }
227218 return { icon : '📄' , prefix : '' } ;
228219 case 'group' :
220+ // Check for CSS-related group names first
221+ if (
222+ node . name . includes ( 'css-assets' ) ||
223+ node . name . includes ( 'css' ) ||
224+ node . name . includes ( 'styles' )
225+ ) {
226+ return { icon : '🎨' , prefix : '' } ;
227+ }
229228 // Group nodes use custom icons from grouping rules
230229 return { icon : ( node . values as any ) . icon || '📦' , prefix : '' } ;
231230 default :
0 commit comments