npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datorama/open-browser-webpack-plugin

v1.0.0

Published

Opens the browser when Webpack is ready serving your files.

Downloads

7

Readme

Open Browser Webpack Plugin

Opens a new browser tab when Webpack loads. Very useful if you're lazy and don't want to force yourself to open a new tab when Webpack is ready to play!

Installation

npm install open-browser-webpack-plugin --save-dev

Usage

Simply require the plugin and add it in the plugins section:

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

module.exports = {
  entry: path.resolve(__dirname, 'lib/entry.js'),
  output: {
    path: __dirname + "/bundle/",
    filename: "bundle.js"
  },
  plugins: [
    new OpenBrowserPlugin({ url: 'http://localhost:3000' })
  ]
};

Options

url

Type: String Default: http://localhost:8080

Url to open when Webpack is ready. Needs to have the prefix http:// or https:// in order to open the browser.

delay

Type: Number Default: 0 Optional

By default the browser is opened immediately, but this could be too early in some cases (eg. starting a nodeJS server). The value is specified in milliseconds.

browser

Type: String Optional

Browser to open. By default, it will try to open the browser set by default in your system.

ignoreErrors

Type: Boolean Default: False Optional

By default this plugin only opens the browser if there's no Webpack errors. Setting ignoreErrors to true will open a new tab no matter the compilation errors.

Change Log

1.0.0 - 2018-30-05

Fixes

  • Replace open with opn to fix vulnerability.

0.0.5 - 2017-03-09

Fixes

  • Fix issue where the compilation never ends. (Thanks to @vkalinichev)

0.0.4 - 2017-02-19

Fixes

  • Fix issue where other Webpack callbacks were removed. (Thanks to @plemarquand)

0.0.3 - 2016-10-31

Added

  • delay option (Thanks to @Root-Core)

0.0.2 - 2015-12-26

Added

  • ignoreErrors option (Thanks to @zhura).
  • Changelog.
  • Documentation for options.

Removed

  • DEFAULT_BROWSER constant.

0.0.1 - 2015-09-12

  • First release.

License

MIT License.