File tree Expand file tree Collapse file tree 4 files changed +15
-12
lines changed
packages/tailwindcss-patch/src Expand file tree Collapse file tree 4 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tailwindcss-patch " : patch
3+ ---
4+
5+ chore: bump version
Original file line number Diff line number Diff line change @@ -69,8 +69,7 @@ export class CacheManager {
6969 return new Set < string > ( data ?? [ ] )
7070 }
7171 }
72- catch ( error ) {
73- logger . error ( error )
72+ catch {
7473 try {
7574 isExisted && await fs . remove ( filename )
7675 }
Original file line number Diff line number Diff line change @@ -29,16 +29,15 @@ export class TailwindcssPatcher {
2929 this . patchOptions = getPatchOptions ( options . patch )
3030
3131 this . cacheManager = new CacheManager ( this . cacheOptions )
32- this . filter = this . patchOptions . filter
32+ this . filter = function filter ( className : string ) {
33+ if ( this . patchOptions . output ?. removeUniversalSelector && className === '*' ) {
34+ return false
35+ }
36+ return Boolean ( this . patchOptions . filter ?.( className ) )
37+ }
3338 const packageInfo = getPackageInfoSync (
3439 this . patchOptions . packageName ?? 'tailwindcss' ,
3540 this . patchOptions . resolve ,
36- // defuOverrideArray<PackageResolvingOptions, Partial<PackageResolvingOptions>[]>(
37- // this.patchOptions.resolve!,
38- // {
39- // paths: [import.meta.dirname],
40- // },
41- // ),
4241 )
4342
4443 if ( ! packageInfo ) {
@@ -159,9 +158,6 @@ export class TailwindcssPatcher {
159158 const keys = classCacheMap . keys ( )
160159 for ( const key of keys ) {
161160 const v = key . toString ( )
162- if ( output ?. removeUniversalSelector && v === '*' ) {
163- continue
164- }
165161 this . filter ?.( v ) && classSet . add ( v )
166162 }
167163 }
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ export function getPatchOptions(options?: PatchOptions) {
1818 return defu < InternalPatchOptions , Partial < InternalPatchOptions > [ ] > (
1919 options ,
2020 {
21+ output : {
22+ removeUniversalSelector : true ,
23+ } ,
2124 basedir : process . cwd ( ) ,
2225 } ,
2326 getDefaultPatchOptions ( ) ,
You can’t perform that action at this time.
0 commit comments