The user's code should be transformed alongside the injected code #47646
Labels
help wanted
Open for all. You do not need permission to work on these.
platform: learn
UI side of the client application that needs familiarity with React, Gatsby etc.
Since the head, contents and tail are evaluated together, they should be Babelified together.
Mostly this is not a problem, but there are edge cases where it breaks. For example https://github.com/freeCodeCamp/freeCodeCamp/blob/237f11be8b777be582e9cfc8d73a3fef907aefa2/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.md tries to reassign a
const
. This should not be allowed, but no errors are thrown because Babel only adds an error when it detects reassignment, but it cannot because Babel evaluates the tail separately from the contents.The text was updated successfully, but these errors were encountered: