File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -5478,7 +5478,7 @@ describe('feature detection', () => {
5478
5478
expect ( compiler . features & Features . Variants ) . toBeFalsy ( )
5479
5479
} )
5480
5480
5481
- test ( '`@tailwind utilities` is discovered inside `@reference`' , async ( ) => {
5481
+ test ( '`@tailwind utilities` is ignored inside `@reference`' , async ( ) => {
5482
5482
let compiler = await compile (
5483
5483
css `
5484
5484
@reference "tailwindcss/utilities" ;
@@ -5497,6 +5497,6 @@ describe('feature detection', () => {
5497
5497
5498
5498
// We see @tailwind utilities but because of @reference it is ignored
5499
5499
expect ( compiler . features & Features . AtImport ) . toBeTruthy ( )
5500
- expect ( compiler . features & Features . Utilities ) . toBeTruthy ( )
5500
+ expect ( compiler . features & Features . Utilities ) . toBeFalsy ( )
5501
5501
} )
5502
5502
} )
Original file line number Diff line number Diff line change @@ -162,6 +162,14 @@ async function parseCss(
162
162
return
163
163
}
164
164
165
+ // When inside `@reference` we should treat `@tailwind utilities` as if
166
+ // it wasn't there in the first place. This should also let `build()`
167
+ // return the cached static AST.
168
+ if ( context . reference ) {
169
+ replaceWith ( [ ] )
170
+ return
171
+ }
172
+
165
173
let params = segment ( node . params , ' ' )
166
174
for ( let param of params ) {
167
175
if ( param . startsWith ( 'source(' ) ) {
You can’t perform that action at this time.
0 commit comments