Open jdwilkin4 opened 1 week ago
I have a silly question if you don't mind. How come whenever the script is placed inside of script.js
instead of the html file, the preview fails to work due to JSX not being supported? It's been driving me mad for months. I was starting to get convinced that the only way we could use front-end libraries in the curriculum properly was to use VueJS.
The reasoning being, I was able to get VueJS to work in our editor with a CDN using the three main files; index.html, styles.css, and script.js. Thought it was without JSX.
@a2937
Oliver did a write up in this PR here that should shed light on what is going on
Okay so there is a pipeline that transforms the JSX babel.
Is it possible to get the script section away out of the html file and into it's own index.jsx
file? I like my JavaScript away from the HTML usually.
Is it possible to get the script section away out of the html file and into it's own index.jsx file?
Short answer, don't know yet. The team is playing around with that to see if it is possible.
But right now it looks like all in one file
Since this prototype has been created, we can now add it to main with tests
https://github.com/freeCodeCamp/CurriculumExpansion/issues/553