File tree 1 file changed +16
-4
lines changed
packages/@tailwindcss-postcss/src
1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -134,11 +134,23 @@ function tailwindcss(opts: PluginOptions = {}): AcceptedPlugin {
134
134
}
135
135
136
136
if ( context . scanner === null || rebuildStrategy === 'full' ) {
137
+ let sources = ( ( ) => {
138
+ // Disable auto source detection
139
+ if ( context . compiler . root === 'none' ) {
140
+ return [ ]
141
+ }
142
+
143
+ // No root specified, use the base directory
144
+ if ( context . compiler . root === null ) {
145
+ return [ { base, pattern : '**/*' } ]
146
+ }
147
+
148
+ // Use the specified root
149
+ return [ context . compiler . root ]
150
+ } ) ( ) . concat ( context . compiler . globs )
151
+
137
152
// Look for candidates used to generate the CSS
138
- context . scanner = new Scanner ( {
139
- detectSources : { base } ,
140
- sources : context . compiler . globs ,
141
- } )
153
+ context . scanner = new Scanner ( { sources } )
142
154
}
143
155
144
156
env . DEBUG && console . time ( '[@tailwindcss/postcss] Scan for candidates' )
You can’t perform that action at this time.
0 commit comments