File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
packages/tailwindcss-language-server/src Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -382,14 +382,18 @@ export class ProjectLocator {
382382 if ( indexPath && themePath ) graph . connect ( indexPath , themePath )
383383 if ( indexPath && utilitiesPath ) graph . connect ( indexPath , utilitiesPath )
384384
385- // Sort the graph so potential "roots" appear first
386- // The entire concept of roots needs to be rethought because it's not always
387- // clear what the root of a project is. Even when imports are present a file
388- // may import a file that is the actual "root" of the project.
389385 let roots = Array . from ( graph . roots ( ) )
390386
391387 roots . sort ( ( a , b ) => {
392- return a . meta . root === b . meta . root ? 0 : a . meta . root ? - 1 : 1
388+ return (
389+ // Sort the graph so potential "roots" appear first
390+ // The entire concept of roots needs to be rethought because it's not always
391+ // clear what the root of a project is. Even when imports are present a file
392+ // may import a file that is the actual "root" of the project.
393+ Number ( b . meta . root ) - Number ( a . meta . root ) ||
394+ // Otherwise stylesheets are kept in discovery order
395+ 0
396+ )
393397 } )
394398
395399 for ( let root of roots ) {
You can’t perform that action at this time.
0 commit comments