codymikol / karma-webpack

Karma webpack Middleware
MIT License
829 stars 222 forks source link

Handle when webpack config erroneously contains an entry point. #458

Closed codymikol closed 3 years ago

codymikol commented 3 years ago

Feature Proposal

When the specified webpack.config contains an entry field, this will overwrite the intended entry field before the internal configuration is merged with the passed webpack.config causing karma-webpack to throw an error and fail.

Since this is something that should never be specified as outlined by the README, we should log a warning if the field is set specifying that it should not be set and that it will be ignored.

We should then delete the entry field before calling webpack-merge to ensure a successful run.

Feature Use Case

Prevent unnecessary failures and give the user feedback about invalid configuration.