File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export async function getTailwindConfig(options: ParserOptions): Promise<any> {
75
75
//
76
76
// For the same reasons as the v4 stylesheet, it's important that the config
77
77
// file be resolved relative to the file it's configured in.
78
- if ( ! stylesheet && ! mod ? .__unstable__loadDesignSystem ) {
78
+ if ( ! stylesheet && mod && ! mod . __unstable__loadDesignSystem ) {
79
79
jsConfig = jsConfig ?? findClosestJsConfig ( inputDir )
80
80
}
81
81
@@ -112,14 +112,6 @@ export async function getTailwindConfig(options: ParserOptions): Promise<any> {
112
112
stylesheet ??= `${ pkgDir } /theme.css`
113
113
}
114
114
115
- // No stylesheet was given or otherwise found in a local v4 installation
116
- // nor was a tailwind config given or found.
117
- //
118
- // Fallback to v3
119
- if ( ! stylesheet ) {
120
- return pathToApiMap . remember ( null , ( ) => loadV3 ( null , null ) )
121
- }
122
-
123
115
return pathToApiMap . remember ( `${ pkgDir } :${ stylesheet } ` , ( ) => loadV4 ( mod , stylesheet ) )
124
116
}
125
117
Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ describe('other', () => {
26
26
27
27
expect ( result ) . toEqual ( '<div class="unknown-class group peer container p-0"></div>' )
28
28
} )
29
+
30
+ test ( 'parasite utilities' , async ( { expect } ) => {
31
+ let result = await format ( '<div class="group peer unknown-class p-0 container"></div>' )
32
+
33
+ expect ( result ) . toEqual ( '<div class="group peer unknown-class container p-0"></div>' )
34
+ } )
29
35
} )
30
36
31
37
describe ( 'whitespace' , ( ) => {
@@ -61,6 +67,6 @@ describe('whitespace', () => {
61
67
test ( 'duplicate classes are dropped' , async ( { expect } ) => {
62
68
let result = await format ( '<div class="underline line-through underline flex"></div>' )
63
69
64
- expect ( result ) . toEqual ( '<div class="flex underline line-through"></div>' )
70
+ expect ( result ) . toEqual ( '<div class="flex line-through underline "></div>' )
65
71
} )
66
72
} )
You can’t perform that action at this time.
0 commit comments