Hey @franva,
It seems like you’re trying to use Netlify CMS as a way to build a Javascript widget that would live-update as you code- that would be super cool, but it is not was the CMS was built for, so I would not expect that to work. The editor on the left only takes in text and images, and then renders them on the right with styling applied.
Let me know if this answers your question or if I misunderstood!
Since I put the separated js file (helpers.js) under static folder, I cannot get process.env working over there, it throws error about undefined process.env.
If I moved the helpers.js under src folder, then the content of helpers.js is somehow replaced by html code.