Webpack plugin to automatically open a browser when webpack's dev server starts. Current stable version is 2.0.2, supports webpack >=4.0.0 <6.0.0. Uses the 'open' package for cross-platform browser launching, including incognito mode via arguments. Differentiators: supports multiple URLs/browsers via array config, delay option, ignore errors option, and includes built-in cross-platform browser name constants for Chrome, Firefox, and Edge. The package ships TypeScript types.
npm install webpack-open-browserVerified import paths — ran on the pinned version, not inferred.
Demonstrates the minimal setup: import the plugin and add it to the plugins array with a URL.
Use const { WebpackOpenBrowser } = require('webpack-open-browser') or import { WebpackOpenBrowser } from 'webpack-open-browser'.Use apps.chrome (cross-platform) or the full application name for your OS (e.g., 'Google Chrome' on Mac, 'chrome' on Windows).
Set the option ignoreErrors: true to open the browser even if there are compilation errors.
N/A
Run npm install webpack-open-browser --save-dev.
Use const { WebpackOpenBrowser } = require('webpack-open-browser');Use apps.chrome or 'Google Chrome' (full application name) for MacOS.