const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
mode: "development",
plugins: [
new HtmlWebpackPlugin()
]
}
@SpaceK33z I searched for a little bit in the code but couldn't find where the best place to make this change would be. I'm happy to PR it, or theres probably others who would too, if you just want to leave a note which part of the code we could default this value.
Essentailly WebpackOptionsApply now is responsible for defaulting the entry if it isnt provided (#0CJS) so we should find a way to respect this.
Thanks for your report! Interesting, this does work when you use the API but not with the CLI. The fix should be made somewhere in bin/webpack-dev-server.js. Somewhere there it seems to trigger webpack's options schema validation without the defaults being applied beforehand.
A PR is very welcome!
Alright I'll try and get this done today.
For those wanting to contribute:
Valid test scenario:
I think this lies more with the webpack-cli rather than the dev server.
I've submitted a PR here that adds the default entry point in the CLI, meaning we're not modifying the config in the dev server
Ignore that last comment, the issue lies with the dev server.
The dev server will generate a small webpack config if not given one (or if given one), that adds the lib/client/js/index.js as an entry point, and then undefined too if you don't pass it.
Fixed in [email protected], thanks again @rynclark!