I think it depends on the microcontroller - most normal chips want you to run code out of on-chip flash, which obviously messes you up. However some chips allow you to memory-map external flash memory. ESP8266/32 specifically execute all user code from external flash, so I see no reason why you couldn't swap the flash chips out
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I think it depends on the microcontroller - most normal chips want you to run code out of on-chip flash, which obviously messes you up. However some chips allow you to memory-map external flash memory. ESP8266/32 specifically execute all user code from external flash, so I see no reason why you couldn't swap the flash chips out