File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,14 @@ import type { selectors } from 'playwright-core'
55export  type  SelectorEngine  =  Parameters < typeof  selectors . register > [ 1 ] 
66
77const  selectorEngine  =  ( fileName : string ) : SelectorEngine  =>  ( { 
8-     // https://github.com/microsoft/playwright/issues/16705 
9-     content : `(() => {${ readFileSync (  
10-         join ( __dirname ,  `../../dist/browser/${ fileName }  ) ,  
11-         'utf8' ,  
12-     ) }  ;return module.exports.default})()`, 
8+     // https://github.com/microsoft/playwright/issues/36448 
9+     content : `(() => { 
10+         if (typeof 'module' === undefined) { 
11+             window.module = {exports: {}}; 
12+         } 
13+         ${ readFileSync ( join ( __dirname ,  `../../dist/browser/${ fileName }  ) ,  'utf8' ) }  
14+         return module.exports.default 
15+     })()` , 
1316} ) 
1417
1518export  const  css  =  selectorEngine ( 'css' ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments