File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ fn parse_all_blobs(blobs: Vec<Vec<u8>>) -> Vec<String> {
5454 let input: Vec < _ > = blobs. iter ( ) . map ( |blob| & blob[ ..] ) . collect ( ) ;
5555 let input = & input[ ..] ;
5656
57- input
57+ let mut result : Vec < String > = input
5858 . par_iter ( )
5959 . map ( |input| Extractor :: unique ( input, Default :: default ( ) ) )
6060 . reduce ( Default :: default, |mut a, b| {
@@ -68,5 +68,7 @@ fn parse_all_blobs(blobs: Vec<Vec<u8>>) -> Vec<String> {
6868 // to a string.
6969 unsafe { String :: from_utf8_unchecked ( s. to_vec ( ) ) }
7070 } )
71- . collect ( )
71+ . collect ( ) ;
72+ result. sort ( ) ;
73+ result
7274}
Original file line number Diff line number Diff line change @@ -163,19 +163,16 @@ export default function expandTailwindAtRules(context) {
163163 let classCacheCount = context . classCache . size
164164
165165 env . DEBUG && console . time ( 'Generate rules' )
166- // TODO: Sorting is _probably_ slow, but right now it can guarantee the same order. Eventually
167- // we will be able to get rid of this.
168166 env . DEBUG && console . time ( 'Sorting candidates' )
169- let sortedCandidates =
170- typeof process !== 'undefined' && process . env . JEST_WORKER_ID
171- ? new Set (
172- [ ...candidates ] . sort ( ( a , z ) => {
173- if ( a === z ) return 0
174- if ( a < z ) return - 1
175- return 1
176- } )
177- )
178- : candidates
167+ let sortedCandidates = env . OXIDE
168+ ? candidates
169+ : new Set (
170+ [ ...candidates ] . sort ( ( a , z ) => {
171+ if ( a === z ) return 0
172+ if ( a < z ) return - 1
173+ return 1
174+ } )
175+ )
179176 env . DEBUG && console . timeEnd ( 'Sorting candidates' )
180177 generateRules ( sortedCandidates , context )
181178 env . DEBUG && console . timeEnd ( 'Generate rules' )
You can’t perform that action at this time.
0 commit comments