Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
325 views
in Technique[技术] by (71.8m points)

javascript - 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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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>


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...