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


#1

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

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


#2

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!


#3

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.


#4

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!