There is a lib https://previewjs.com that allow to render a piece of code and preview module in the browser, would be great to have similar approach within B2storefront