Are you connecting Espruino to an ESP8266, or are you running the Espruino firmware on and ESP8266? It sounds like the latter.
If so, you're going to have to make changes to the C code itself: https://github.com/espruino/Espruino
@Gordon started
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.
Are you connecting Espruino to an ESP8266, or are you running the Espruino firmware on and ESP8266? It sounds like the latter.
If so, you're going to have to make changes to the C code itself: https://github.com/espruino/Espruino