Is it possible to add Class Properties babel transform to the runtime environment?

I would like to use Class Properties in my runtime environment.

Is it possible to add babel transforms to the environment in any way?

Hi taras,

Its not built-in to the tool yet (we only apply approved babel plugins stage-3+), but this is definitely a feature we want to implement, just tricky getting it right. I tried using babel-register to see if I could hack it by requiring a different RunKit notebook, but the way we handle that prevents it too. I’m going to keep thinking if there’s a tacky way to accomplish it now while we figure out a real solution. Apologies that it’s not immediately obvious how to do this!

1 Like

No problem. it looks like Class Fields are Stage 3 already https://github.com/babel/proposals/issues/12 but I can’t tell what the status for this transform is.

Ah in that case we might just added to the standard set, I’ll take a closer look in a bit. Thanks for point this out!

I beat you to the Punch…
https://runkit.com/hesygolu/60cd531974fe2e001afebfc8