What does question mark (?) mean in webpack's entry?

I'm learning webpack and came across an example webpack.config.js that looks like this:

module.exports = {
    entry: [
        'webpack-dev-server/client?http://localhost:3030',
        'webpack/hot/only-dev-server',
        './src/boot.js'
    ],
...

I could not find any specification of the use of question mark in this case, but I assume it's like a parameter to the module webpack-dev-server/client, am I right?

1 answer

  • answered 2021-01-11 09:04 tmhao2005

    I think this is just a specifically for webpack-dev-server/client only. This is a common way to add webpack-dev-server/client to the bundle for automatic refresh.

    The signature looks like: webpack-dev-server/client?http://<path>:<port>