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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/find config recursively #693
Feature/find config recursively #693
Changes from 3 commits
a972f1d
14ec0a5
e941b49
1bd68a3
1f2b7e2
b61220e
3862295
1781c1f
95dc56c
29a6060
fc8a5b9
3ec2e9d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good chance to move
"webpack.config"
and"webpackfile"
inside two constantsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need some logic change here. Let's see both implementations.
existing-implementation: try to find file from
["webpack.config", "webpackfile"]
in cwd.current-modification:
webpack.config
in up-fashion.webpackfile
in up-fashion.Do we see the problem here? Even though
webpackfile
is there one level above, it would not be discovered, but 2 level upwebpack.config
would be given chance first.I would want both files to get a fair chance to be discovered. @evenstensberg @ematipico your thoughts on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
top-down priority is the best
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evenstensberg sorry, I did not get you. Can you give any example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hemal7735 I think you are right. I implemented a solution with (dynamically created) RegExp, but I didn't merge it into this PR. I also added
webpackfile
related tests. Could you please check it? https://github.com/lakatostamas/webpack-cli/compare/1f2b7e2..727a59aThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah both files should always have the same priority at each path of directory structure.