codymikol / karma-webpack

Karma webpack Middleware
MIT License
830 stars 222 forks source link

[4.0.0-rc.3] Bug or feature? Behavior when webpack configuration has an entry #372

Closed matthieu-foucault closed 3 years ago

matthieu-foucault commented 5 years ago

Documentation Is:

The issue

In the Readme, the comments say you don't need to specify the entry option. It doesn't say what happens if you do though. Currently, whatever is in the configuration entry will be bundled by Webpack in addition to the karma files. If you are like me and you are reusing the same configuration for building and testing, it makes the testing really slow, as the main entry point of your application will be bundled with the tests.

What should be done

ryanclark commented 5 years ago

Yes, it'll build any given entry files and also add all the given test files as entry files too. I don't think we should restrict this, as there are probably reasons that this behaviour would be wanted, but I agree that the docs could be a bit better.

codymikol commented 3 years ago

Currently v5 enforces a single entry point and there is another ticket out for supporting multiple entries #165