1. 程式人生 > >webpack 啟動後自動開啟瀏覽器外掛:open-browser-webpack-plugin

webpack 啟動後自動開啟瀏覽器外掛:open-browser-webpack-plugin

在webpack.config檔案中新增

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

  plugins: [
        new OpenBrowserPlugin({ url: 'http://localhost:8080' })
    ]

則在webpack 啟動成功後會開啟瀏覽器