File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
packages/cli-v3/src/entryPoints Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,18 @@ const zodIpc = new ZodIpcConnection({
324324 async ( ) => {
325325 const beforeImport = performance . now ( ) ;
326326 resourceCatalog . setCurrentFileContext ( taskManifest . entryPoint , taskManifest . filePath ) ;
327+
328+ // Load init file if it exists
329+ if ( workerManifest . initEntryPoint ) {
330+ try {
331+ await import ( normalizeImportPath ( workerManifest . initEntryPoint ) ) ;
332+ console . log ( `Loaded init file from ${ workerManifest . initEntryPoint } ` ) ;
333+ } catch ( err ) {
334+ console . error ( `Failed to load init file` , err ) ;
335+ throw err ;
336+ }
337+ }
338+
327339 await import ( normalizeImportPath ( taskManifest . entryPoint ) ) ;
328340 resourceCatalog . clearCurrentFileContext ( ) ;
329341 const durationMs = performance . now ( ) - beforeImport ;
You can’t perform that action at this time.
0 commit comments