File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed 
integrations/tailwindcss-cli/tests Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,45 @@ describe('Build command', () => {
207207    ) 
208208  } ) 
209209
210+   test ( 'configs support import.meta' ,  async  ( )  =>  { 
211+     await  writeInputFile ( 'index.html' ,  html `<div class= "font-bold" > </ div> ` ) 
212+ 
213+     let  customConfig  =  ` 
214+       console.log(import.meta.url) 
215+       console.log(import.meta.resolve('./tailwind.config.mjs')) 
216+       export default ${ JSON . stringify (  
217+         {  
218+           content : [ './src/index.html' ] ,  
219+           theme : {  
220+             extend : {  
221+               fontWeight : {  
222+                 bold : 'BOLD' ,  
223+               } ,  
224+             } ,  
225+           } ,  
226+           corePlugins : {  
227+             preflight : false ,  
228+           } ,  
229+           plugins : [ ] ,  
230+         } ,  
231+         null ,  
232+         2  
233+       ) }  
234+     ` 
235+ 
236+     await  writeInputFile ( '../tailwind.config.mjs' ,  customConfig ) 
237+ 
238+     await  $ ( `${ EXECUTABLE }  ) 
239+ 
240+     expect ( await  readOutputFile ( 'main.css' ) ) . toIncludeCss ( 
241+       css ` 
242+         .font-bold  { 
243+           font-weight :  BOLD; 
244+         } 
245+       ` 
246+     ) 
247+   } ) 
248+ 
210249  test ( '--content' ,  async  ( )  =>  { 
211250    await  writeInputFile ( 'other.html' ,  html `<div class= "font-bold" > </ div> ` ) 
212251
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments