Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
It was noticed that errors were being improperly reported when trying to debug the code. This was due to an issue with the esbuild configuration, and the babel plugin callbacks used during bundling.
See the discussion here
Description
It was noticed that any files that used babel to inline
bySport
orisSport
configurations were being listed asunknown
in the debugger. It was also noticed that these babel transformed files were unlisted within the debugger.To solved this issue, a
onResolve
callback was added to the esbuild plugin function defined in the configuration.Once the
onResolve
callback was added, we needed to make sure that the files being filtered by the callback were transformed properly.To solve this problem, we added a namespace field to the
onResolve
callback result, and filtered files that passed through theonLoad
callback to files within the namespace set duringonResolve
.Finally, as good practice, dead code was removed from the
onLoad
callback.Now that only certain files were being passed through the
onLoad
callback, we no longer need to check if the file should be babel transformed. We removed logic to filter out files to be transformed or not, since the only files coming through to the onLoad callback need to be transformed.