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
Due to how cosmicConfig is being used specifying an absolute path to a config file does't work. When specifying a --config arg the value is passed into searchPlaces. However this is meant to be a place that cosmicConfig looks at each level as it traverses up the directory not a path.
Something like --config ../foo.config.js also doesn't work
If the current behavior is a bug, please provide the steps to reproduce.
To repro:
Try something like bundlesize --config ../foo.json or bundlesize --config /Users/gcoombe/apps/bundlesize.json
What is the expected behavior?
Absolute paths or relative paths not within the cwd or subdirectory should work,
If this is a feature request, what is motivation or use case for changing the behavior?
I can try and submit a PR but it seems like if we're specifying a config arg we should just treat it like a path and not use cosmicConfig. I'm not sure what we're attempting to gain with this dependency.
Part 1: Verified that absolute path doesn't work. (cosmic-config prepends the current directory to path)
Part 2: I was able to make --config ../foo.config.js work, check out the tests in #327. Can you create a small reproduction repo for this? (Or modify the tests to reproduce this)
Do you want to request a feature or report a bug?
Report bug
What is the current behavior?
Due to how cosmicConfig is being used specifying an absolute path to a config file does't work. When specifying a
--config
arg the value is passed into searchPlaces. However this is meant to be a place that cosmicConfig looks at each level as it traverses up the directory not a path.Something like
--config ../foo.config.js
also doesn't workIf the current behavior is a bug, please provide the steps to reproduce.
To repro:
bundlesize --config ../foo.json
orbundlesize --config /Users/gcoombe/apps/bundlesize.json
What is the expected behavior?
Absolute paths or relative paths not within the cwd or subdirectory should work,
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information.
[email protected]
The text was updated successfully, but these errors were encountered: