File tree Expand file tree Collapse file tree 3 files changed +12
-17
lines changed Expand file tree Collapse file tree 3 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' pleasantest ' : minor
3+ ---
4+
5+ Fix fork URL for ESM use
Original file line number Diff line number Diff line change @@ -91,19 +91,6 @@ function bundlePlugin() {
9191
9292 return resolved ;
9393 } ,
94- resolveFileUrl ( { relativePath, format } ) {
95- return format === 'es'
96- ? `new URL('${ relativePath } ', import.meta.url).href`
97- : `require('path').join(__dirname,'${ relativePath } ')` ;
98- } ,
99- resolveImportMeta ( property , { format } ) {
100- if ( property === 'url' && format === 'cjs' ) {
101- // eslint-disable-next-line no-template-curly-in-string
102- return '`file://${__filename}`' ;
103- }
104-
105- return null ;
106- } ,
10794 async load ( id ) {
10895 if ( ! id . startsWith ( '\0bundle:' ) ) return ;
10996 id = id . slice ( 8 ) ;
Original file line number Diff line number Diff line change @@ -111,10 +111,13 @@ export const connectToBrowser = async (
111111 return connectedBrowser ;
112112 }
113113
114- const subprocess = childProcess . fork ( startDisownedBrowserPath , {
115- detached : true ,
116- stdio : 'ignore' ,
117- } ) ;
114+ const subprocess = childProcess . fork (
115+ fileURLToPath ( startDisownedBrowserPath ) ,
116+ {
117+ detached : true ,
118+ stdio : 'ignore' ,
119+ } ,
120+ ) ;
118121 const wsEndpoint = await new Promise < string > ( ( resolve , reject ) => {
119122 subprocess . send ( { browser, headless } ) ;
120123 subprocess . on ( 'message' , ( msg : any ) => {
You can’t perform that action at this time.
0 commit comments