JSFiddle - React, Tailwind, and code Playground

HTML

<script  id="foo" type="application/json" >
alert('coucou')</script>

CSS

.hs {display:none;}

JavaScript

$( function(){
$f= $('#foo');
$t= $('<script/>')
$t.attr('type', 'text/javascript')
  .text( $f.text() );
$('#foo').replaceWith( $t )

})