只需要在webpack.config.js中加入devServer: { inline: true }的配置即可。
然后命令行执行如下命令就行了
webpack-dev-server --inline
Paste_Image.png
Inline mode
To use the inline mode, either
specify --inline
on the command line.
specify devServer: { inline: true }
in your webpack.config.js