fix: parse root dir even if inside a node_modules folder #76
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.
Resolves
NOTE: This may not need to be merged in case scratch-android starts using scratch-gui from an npm package, instead of a git commit as it does currently.
A dependency for https://scratchfoundation.atlassian.net/browse/UEPR-139
Proposed Changes
Force babel to parse the root folder, even if inside a node_modules futher up the hierarchy.
Reason for Changes
In another repo -
scratch-android
- we are manually buildingscratch-gui
by going inside its folder (which is inside node_modules ofscratch-android
) and making a webpack build. After the update ofscratch-gui
to usescratch-webpack-config
that stopped working, since currently there is a rule which prevents babel from parsing folders inside anode_modules
folder. However that is not relative to the thepwd
so if the project we are trying to build is inside anode_modules
further up the chain, babel will not transpile the necessary files (e.g. .jsx files).