Is there a way to import and export 'map' and 'view' whether using the AMD or ESM module, knowing that I work in CDN mode with API JS Arcgis 4.24, my code is very long and contains two blocks that depend on 'map' and 'view', so I'm trying to separate the blocks into two distinct files, one main file that needs to export 'map' and 'view' to the second one, I tested with AMD module and then with the ESM module with the necessary modifications including the 'type' in index.html, but without success, I also put test variables or test constants, I manage to export and import them without problems , but not 'map' and 'view'!
Does anyone have any idea on the correct method to import and export 'map' and 'view'?