-
-
Notifications
You must be signed in to change notification settings - Fork 591
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(bin): extension detection (#724) #728
Conversation
This should fix the problem of .babel.js discussed in webpack/webpack#5960 |
We should add a bin test for that, if possible |
@lakatostamas Thanks for your update. I labeled the Pull Request so reviewers will review it again. @ematipico Please review the new changes. |
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.
Thanks!
@ematipico Thanks for the review! The webpack-babel-config test works because in the project root we have a |
I personally prefer install an additional devDependency and make sure that we don't break those kind of scenarios. After all this is a package used by lot of people :) what do you think? |
Okay, that makes sense. I added |
@lakatostamas The most important CI builds failed. This way your PR can't be merged. Please take a look at the CI results from travis (failure) and fix these issues. |
What kind of change does this PR introduce?
bugfix
Did you add tests for your changes?
No, but I created test repositories:
https://github.com/lakatostamas/webpack-babel
https://github.com/lakatostamas/webpack-ts
Summary
Issue: #724
This commit introduced a bug in the default config file discovery: b61220e#diff-daabbe74e88640829a3ad9e9899efd8cR79
Before this commit, the extension of
webpack.config.ts
was.ts
in the default configFile discovery, but after this commit, it became justts
(without.
).webpack.config.babel.js
extension isjs
now, but it should be.babel.js
. With this pull request, I introduce a fix, which gets the name of the default config file and removes thewebpack.config
orwebpackfile
from it.I don't know how to add tests when the extension of webpack config is not
js
. I haven't found any example, but if you tell me how to do it, I would happily add some tests to cover these cases.Does this PR introduce a breaking change?
No