@@ -1567,40 +1567,44 @@ class TW {
1567
1567
contentSelector = getContentDocumentSelectorFromConfigFile ( configPath , twVersion , base )
1568
1568
} catch { }
1569
1569
1570
- let documentSelector = contentSelector
1571
- . concat ( {
1570
+ let documentSelector : DocumentSelector [ ] = [
1571
+ {
1572
1572
pattern : normalizePath ( filename ) ,
1573
1573
priority : isCssFile
1574
1574
? DocumentSelectorPriority . CSS_FILE
1575
1575
: DocumentSelectorPriority . CONFIG_FILE ,
1576
- } )
1577
- . concat (
1578
- isCssFile
1579
- ? {
1576
+ } ,
1577
+ ... ( isCssFile
1578
+ ? [
1579
+ {
1580
1580
pattern : normalizePath ( configPath ) ,
1581
1581
priority : DocumentSelectorPriority . CONFIG_FILE ,
1582
- }
1583
- : [ ]
1584
- )
1585
- . concat ( {
1582
+ } ,
1583
+ ]
1584
+ : [ ] ) ,
1585
+ ...contentSelector ,
1586
+ {
1586
1587
pattern : normalizePath ( path . join ( path . dirname ( filename ) , '**' ) ) ,
1587
1588
priority : isCssFile
1588
1589
? DocumentSelectorPriority . CSS_DIRECTORY
1589
1590
: DocumentSelectorPriority . CONFIG_DIRECTORY ,
1590
- } )
1591
- . concat (
1592
- isCssFile
1593
- ? {
1591
+ } ,
1592
+ ... ( isCssFile
1593
+ ? [
1594
+ {
1594
1595
pattern : normalizePath ( path . join ( path . dirname ( configPath ) , '**' ) ) ,
1595
1596
priority : DocumentSelectorPriority . CONFIG_DIRECTORY ,
1596
- }
1597
- : [ ]
1598
- )
1599
- . concat ( {
1597
+ } ,
1598
+ ]
1599
+ : [ ] ) ,
1600
+ {
1600
1601
pattern : normalizePath ( path . join ( getPackageRoot ( path . dirname ( configPath ) , base ) , '**' ) ) ,
1601
1602
priority : DocumentSelectorPriority . ROOT_DIRECTORY ,
1602
- } )
1603
+ } ,
1604
+ ]
1605
+
1603
1606
projects [ configPath ] = [ ...( projects [ configPath ] ?? [ ] ) , ...documentSelector ]
1607
+
1604
1608
if ( isCssFile ) {
1605
1609
cssFileConfigMap . set ( normalizedFilename , configPath )
1606
1610
}
0 commit comments