I'm submitting a feature request
Webpack version:
2.x
Current behavior:
webpack automatically appends -loader to a module when the first module lookup failed
Expected/desired behavior:
webpack should not append -loader
What is the motivation / use case for changing the behavior?
It can lead to errors that are hard to understand for newcomers. I've seen it a couple of times that webpack tried to resolve the css module as css-loader because people have just configured loader: "css". In combination with npm@3, this can be very confusing as you may have never installed the css module by yourself.
This change would probably require a lot of webpack configs to be adjusted, but since the loader configuration has been changed in webpack@2 anyway, we should include that change as well. As a downside, the config will become a little more verbose because now everyone has to write style-loader!css-loader, but I think the benefit outweighs the downside by far.
I'm submitting a feature request
Webpack version:
2.x
Current behavior:
webpack automatically appends
-loaderto a module when the first module lookup failedExpected/desired behavior:
webpack should not append
-loaderWhat is the motivation / use case for changing the behavior?
It can lead to errors that are hard to understand for newcomers. I've seen it a couple of times that webpack tried to resolve the css module as css-loader because people have just configured
loader: "css". In combination with npm@3, this can be very confusing as you may have never installed the css module by yourself.This change would probably require a lot of webpack configs to be adjusted, but since the loader configuration has been changed in webpack@2 anyway, we should include that change as well. As a downside, the config will become a little more verbose because now everyone has to write
style-loader!css-loader, but I think the benefit outweighs the downside by far.