-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
fix: allow unknown files to use default require as fallback #1747
Conversation
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.
I don|t think this is correct. We need interpret to take both cjs and regular files. This takes a file and its extention, the double filtering is to check for cjs ext
Considering a file is a small set, I think this is ok |
This is how gulp also uses it, prepares env which need specific module, rest fallback to the default node loader, no use of filtering |
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.
I think this removes cjs support, could you make a test file first?
Nope doesn't remove, I already added tests for cjs when I added it's support #1727 |
@anshumanv Thanks for your update. I labeled the Pull Request so reviewers will review it again. @evenstensberg Please review the new changes. |
I think without extensions we should confider it as a JS file, it is edge case, but it doesn't mean we should ignore it |
@evilebottnawi talking about config file that doesn't exist eg |
@anshumanv if config doesn't exists we should throw an error |
Gotcha, will implement in near future |
I think we're good here then |
27bf777
76e2320
to
27bf777
Compare
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.
/cc @webpack/cli-team
What kind of change does this PR introduce?
fix
Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
No need
Summary
Does this PR introduce a breaking change?
No
Other information
Question -> when we pass some file which doesn't exist ex
-c webpack.testconfig.js
we fallback to default configwebpack.config.js
, should we allow that considering the user already passed a config they want to use or should we throw err that config not found?