{"id":20252,"library":"open-browser-webpack-plugin","title":"open-browser-webpack-plugin","description":"Opens a new browser tab when Webpack finishes its first compilation. Current stable version is 0.0.5 (released March 2017). No recent updates; plugin uses the webpack 'done' hook and relies on the 'open' npm package under the hood. It is more limited than alternatives like open-browser-webpack-plugin or webpack-open-plugin, with no support for Webpack 4+ hooks or multi-compiler mode. Suitable only for simple single-compiler Webpack 1-3 setups.","status":"deprecated","version":"0.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/baldore/webpack-open-plugin","tags":["javascript","webpack","plugin","browser","tab","open","ready","improvement"],"install":[{"cmd":"npm install open-browser-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add open-browser-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add open-browser-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used internally to open the browser URL","package":"open","optional":false}],"imports":[{"note":"Package does not export ESM; CommonJS require is required. For webpack 4+ use plugins like open-browser-webpack-plugin or webpack-open-plugin.","wrong":"import OpenBrowserPlugin from 'open-browser-webpack-plugin';","symbol":"OpenBrowserPlugin","correct":"var OpenBrowserPlugin = require('open-browser-webpack-plugin');"},{"note":"It is a default export, not named.","wrong":"const { OpenBrowserPlugin } = require('open-browser-webpack-plugin');","symbol":"OpenBrowserPlugin","correct":"const OpenBrowserPlugin = require('open-browser-webpack-plugin');"},{"note":"Options must be passed as an object. The url property is required.","wrong":"new OpenBrowserPlugin('http://localhost:3000')","symbol":"OpenBrowserPlugin","correct":"new OpenBrowserPlugin({ url: 'http://localhost:3000' })"}],"quickstart":{"code":"const path = require('path');\nconst OpenBrowserPlugin = require('open-browser-webpack-plugin');\n\nmodule.exports = {\n  entry: path.resolve(__dirname, 'src/index.js'),\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js'\n  },\n  plugins: [\n    new OpenBrowserPlugin({ url: 'http://localhost:8080' })\n  ]\n};","lang":"javascript","description":"Shows how to add the plugin to a Webpack 1-3 config; opens browser at localhost:8080 on first compile."},"warnings":[{"fix":"Use open-browser-webpack-plugin (2.x) or webpack-open-plugin instead.","message":"Package is unmaintained since 2017; no Webpack 4+ support.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Update to >=0.0.4","message":"Version 0.0.4 fixed an issue where other Webpack callbacks were removed; upgrade from 0.0.3.","severity":"breaking","affected_versions":"0.0.3"},{"fix":"Set url to 'http://localhost:3000' (with protocol).","message":"The url option must include http:// or https:// prefix, otherwise the browser won't open.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use webpack-dev-server's built-in open option or a dev-server plugin.","message":"Plugin only opens browser on first compilation; subsequent rebuilds (e.g., with webpack-dev-server) will not re-open.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Migrate to a newer plugin or use webpack 5 compatible alternative.","message":"Uses older webpack plugin API (apply method with compiler.plugin); incompatible with webpack 5.","severity":"deprecated","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use a webpack 4+ compatible plugin like open-browser-webpack-plugin.","cause":"Plugin used with webpack 4+ or in multi-compiler mode without proper hook support.","error":"TypeError: Cannot read property 'compiler' of undefined"},{"fix":"Run: npm install open-browser-webpack-plugin --save-dev","cause":"Package not installed or incorrect import path.","error":"Error: Module not found: Error: Can't resolve 'open-browser-webpack-plugin'"},{"fix":"Run: npm install open@0.0.5","cause":"Missing dependency 'open' (optional peer dependency).","error":"The 'open' module is required but not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}