Just to update on what was behind this: we rolled out the snippets backend with Babel updated to 7.25.6
, which requires various data-presets
for things to work. (In this particular case we're interested in the react
preset.)
The corresponding frontend deployment lagged behind slightly (many thanks, integration tests), plus a hotfix was required for backward compatibility for pre-existing React snippets. It looks like any snippets created during that time have ended up misconfigured, which I think is to do with the HTML post-processing step (so is baked into the posts).
It may be a case, at this point, of just rooting those out and removing the babelPresetReact
flag, as I've rudely done with the snippet in this question. I'll have a look at whether this can be done programmatically to save everyone some time.
<!-- begin snippet: js hide: false console: false babel: false babelPresetReact: false babelPresetTS: false -->
whereas it should have been<!-- begin snippet: js hide: false console: true babel: false -->
--- so I changed it and now my answer now has the code snippet button rendering.