🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

webpack-open-browser

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-open-browser

open browser when webpack loads

Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
4.2K
-15.84%
Maintainers
1
Weekly downloads
 
Created
Source

webpack-open-browser

npm npm Build Status dependencies Status devDependencies Status Known Vulnerabilities Percentage of issues still open PRs Welcome

open browser when webpack loads

:package: Installation

# npm
npm install webpack-open-browser -D
# yarn
yarn add webpack-open-browser -D

:wrench: Configuration

const { WebpackOpenBrowser } = require('webpack-open-browser');

const commonConfig = {
  plugins: [
    // open http://localhost:3000 in default browser
    new WebpackOpenBrowser({ url: 'http://localhost:3000' }),
    // more options
    // specify firefox to open
    new WebpackOpenBrowser({ url: 'http://localhost:3000', browser: 'firefox' }),
    // delay 3 seconds
    new WebpackOpenBrowser({ url: 'http://localhost:3000', delay: 3 * 1000 }),
    // By default, this plugin only works when no compile error
    new WebpackOpenBrowser({ url: 'http://localhost:3000', ignoreErrors: true }),
    // You can set a group of option to open multiple urls in multiple browsers
    new WebpackOpenBrowser([
      { url: 'http://localhost:3000', browser: 'chrome' },
      { url: 'http://localhost:3000', browser: 'firefox' },
    ]),
  ],
};

Keywords

webpack

FAQs

Package last updated on 20 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts