huruji / open-browser-plugin

A webpack plugin to solve the problem that webpack-dev-server can not automatically open the browser via node api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

open-browser-plugin

A webpack plugin to solve the problem that webpack-dev-server can not automatically open the browser via node api

How to use

npm i --save-dev open-browser-plugin
// webpack.config.js
const OpenBrowserPlugin = reuire('open-browser-plugin')

const config = {
  plugins: [
    new OpenBrowserPlugin({
      port: 8080
    })
  ]
}

options

port

default 8080

host

default localhost

protocol

default http:

About

A webpack plugin to solve the problem that webpack-dev-server can not automatically open the browser via node api


Languages

Language:JavaScript 100.0%