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({
324
324
async ( ) => {
325
325
const beforeImport = performance . now ( ) ;
326
326
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
+
327
339
await import ( normalizeImportPath ( taskManifest . entryPoint ) ) ;
328
340
resourceCatalog . clearCurrentFileContext ( ) ;
329
341
const durationMs = performance . now ( ) - beforeImport ;
You can’t perform that action at this time.
0 commit comments