@@ -425,8 +425,13 @@ async function requireHelperFromModule(helperName, config, HelperClass) {
425425 importPath = tempFile
426426 tempJsFile = allTempFiles
427427 fileMapping = mapping
428- // Store file mapping in container for runtime error fixing
429- container . tsFileMapping = mapping
428+ // Store file mapping in container for runtime error fixing (merge with existing)
429+ if ( ! container . tsFileMapping ) {
430+ container . tsFileMapping = new Map ( )
431+ }
432+ for ( const [ key , value ] of mapping . entries ( ) ) {
433+ container . tsFileMapping . set ( key , value )
434+ }
430435 } catch ( tsError ) {
431436 throw new Error ( `Failed to load TypeScript helper ${ importPath } : ${ tsError . message } . Make sure 'typescript' package is installed.` )
432437 }
@@ -769,8 +774,13 @@ async function loadSupportObject(modulePath, supportObjectName) {
769774 // Store temp files list in a way that cleanup can access them
770775 tempJsFile = allTempFiles
771776 fileMapping = mapping
772- // Store file mapping in container for runtime error fixing
773- container . tsFileMapping = mapping
777+ // Store file mapping in container for runtime error fixing (merge with existing)
778+ if ( ! container . tsFileMapping ) {
779+ container . tsFileMapping = new Map ( )
780+ }
781+ for ( const [ key , value ] of mapping . entries ( ) ) {
782+ container . tsFileMapping . set ( key , value )
783+ }
774784 } catch ( tsError ) {
775785 throw new Error ( `Failed to load TypeScript file ${ importPath } : ${ tsError . message } . Make sure 'typescript' package is installed.` )
776786 }
0 commit comments