Skip to content

Commit be383a5

Browse files
authored
Merge pull request #110 from topcoder-platform/jsx_interpreter
Reattach the JSX interpretter -> prod
2 parents 66b4ee9 + 4918db4 commit be383a5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/src/templates/Challenges/rechallenge/transformers.js

+6
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ export const embedFilesInHtml = async function (challengeFiles) {
222222
script.removeAttribute('src');
223223
script.setAttribute('data-src', 'script.js');
224224
}
225+
if (indexJsx?.contents) {
226+
// automatic linking of jsx to html
227+
const newScript = contentDocument.createElement('script');
228+
newScript.innerHTML = indexJsx?.contents;
229+
contentDocument.head.appendChild(newScript);
230+
}
225231
return {
226232
contents: documentElement.innerHTML
227233
};

0 commit comments

Comments
 (0)