# Webpack-dev-server Configuration implementation feature in Webpack
The first is to use NPM to download NPM install Webpack-dev-server--save-dev
Open webpack.config.js Add configuration information, need to modify output, add Devserver,
Plugins
This is where you write absolute paths in output.
...
output:{
Path: ' Lib ',//My path here is under the Lib folder
Publicpath: "http://127.0.0.1:8080/lib/",
FileName: ' Bundle.js '
},
...
...
devserver:{
Historyapifallback:true,
Hot:true,
Inline:true,
Progress:true,
},
...
plugins:[
New Webpack. Defineplugin ({
' Process.env.NODE.ENV ': "Development"
}),
New Webpack. Hotmodulereplacementplugin ()
]
This is a good configuration. The next step is to start it, and we can customize the command. In the Package.js
...
"Scripts": {
"Start": "Webpack-dev-server--inline"//not added here-hot
},
...
Save, OK. Enter NPM run start
When you are finished running, open your browser and enter http://localhost:8080/lib/index.html, then try again.
Configuration of the Webpack-dev-server