You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to emulate Parcel's config-file resolution[1][2] (to work around the fact that it no longer works synchronously), which walks up from an asset's directory to either the filesystem root directory or the nearest enclosing node_modules directory, whichever comes first. This is proving to be difficult because stopDir is required to be a fixed/absolute path.
In theory, I could walk up from the asset's directory myself to see if there's an enclosing node_modules directory and supply that as the static stopDir, but I'd rather not roll my own directory traversal since it defeats the point of using this module.
The desired behavior would be straightforward to emulate if the stopDir option could (optionally) be supplied as a function, e.g.:
I'm trying to emulate Parcel's config-file resolution[1][2] (to work around the fact that it no longer works synchronously), which walks up from an asset's directory to either the filesystem root directory or the nearest enclosing
node_modules
directory, whichever comes first. This is proving to be difficult becausestopDir
is required to be a fixed/absolute path.In theory, I could walk up from the asset's directory myself to see if there's an enclosing
node_modules
directory and supply that as the staticstopDir
, but I'd rather not roll my own directory traversal since it defeats the point of using this module.The desired behavior would be straightforward to emulate if the
stopDir
option could (optionally) be supplied as a function, e.g.:The text was updated successfully, but these errors were encountered: