Commit ed8ff92 1 parent e17855b commit ed8ff92 Copy full SHA for ed8ff92
File tree 2 files changed +13
-14
lines changed
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> {
54
54
let input: Vec < _ > = blobs. iter ( ) . map ( |blob| & blob[ ..] ) . collect ( ) ;
55
55
let input = & input[ ..] ;
56
56
57
- input
57
+ let mut result : Vec < String > = input
58
58
. par_iter ( )
59
59
. map ( |input| Extractor :: unique ( input, Default :: default ( ) ) )
60
60
. reduce ( Default :: default, |mut a, b| {
@@ -68,5 +68,7 @@ fn parse_all_blobs(blobs: Vec<Vec<u8>>) -> Vec<String> {
68
68
// to a string.
69
69
unsafe { String :: from_utf8_unchecked ( s. to_vec ( ) ) }
70
70
} )
71
- . collect ( )
71
+ . collect ( ) ;
72
+ result. sort ( ) ;
73
+ result
72
74
}
Original file line number Diff line number Diff line change @@ -163,19 +163,16 @@ export default function expandTailwindAtRules(context) {
163
163
let classCacheCount = context . classCache . size
164
164
165
165
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.
168
166
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
+ )
179
176
env . DEBUG && console . timeEnd ( 'Sorting candidates' )
180
177
generateRules ( sortedCandidates , context )
181
178
env . DEBUG && console . timeEnd ( 'Generate rules' )
You can’t perform that action at this time.
0 commit comments