webpack 相关配置

  1.  自动吊起浏览器  【open-browser-webpack-plugin】

 安装包: open-browser-webpack-plugin,  npm install open-browser-webpack-plugin

 配置: 在webpack.config,js/webpack.dev.conf.js 配置文件里添加

/*定义自动打开浏览器*/

const OpenBrowserPlugin = require('open-browser-webpack-plugin');

plugins里面添加 

 plugins: [
    new OpenBrowserPlugin({ url: 'http://localhost:8080' }) //自动打开浏览器
  ]

你可能感兴趣的:(webpack,npm,webpack)