# open-browser-webpack-plugin

> Opens the browser when Webpack is ready serving your files.

Latest version **0.0.5** (published 2017-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install open-browser-webpack-plugin
pnpm add open-browser-webpack-plugin
yarn add open-browser-webpack-plugin
bun add open-browser-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2017-03-09 |
| First published | 2015-09-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 117 |
| Author | Camilo Orrego |
| Maintainers | baldore |
| Keywords | webpack, plugin, browser, tab, open, ready, improvement |

## Links

- npm: https://www.npmjs.com/package/open-browser-webpack-plugin
- Repository: https://github.com/baldore/webpack-open-plugin
- Homepage: https://github.com/baldore/webpack-open-plugin#readme
- Issues: https://github.com/baldore/webpack-open-plugin/issues
- npm.io page: https://npm.io/package/open-browser-webpack-plugin

## Dependencies (1)

- [open](https://npm.io/package/open.md) 0.0.5

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2017-03-09
- 0.0.4 — 2017-02-19
- 0.0.3 — 2016-10-31
- 0.0.2 — 2015-12-26
- 0.0.1 — 2015-09-13

## 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:

```javascript
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`<br>
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`<br>
Default: `0`<br>
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`<br>
Optional

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

#### ignoreErrors

Type: `Boolean`<br>
Default: `False`<br>
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

### 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.

---
_Source: https://npm.io/package/open-browser-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
