qrcode-webpack-plugin
v1.0.4
Published
Print the QR code on the console after running webpack-dev-server
Downloads
7
Maintainers
Readme
devserver-qrcode-webpack-plugin
webpack-dev-server运行时在控制台打印二维码
安装
$ npm install qrcode-webpack-plugin
使用
webpack.config.js
const QRcodeWebpackPlugin = require('qrcode-webpack-plugin')
module.exports = {
devServer: {
...
host: '0.0.0.0'
},
plugins: [
new QRcodeWebpackPlugin()
]
}
确保电脑和手机处于同一个局域网内,手机扫码即可预览,手机端支持实时刷新。