From 1f8bbc49b0a1721e83a3c44d7d08c244832decd4 Mon Sep 17 00:00:00 2001 From: Suhail Taj Shaik Date: Wed, 27 Sep 2017 17:35:02 -0500 Subject: [PATCH] webpack-Auto open browser plugin added --- package.json | 1 + webpack.config.js | 2 ++ yarn.lock | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/package.json b/package.json index 83e3d1a..b1cf4ba 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "license": "MIT", "dependencies": { "file-loader": "^0.9.0", + "open-browser-webpack-plugin": "^0.0.5", "prop-types": "^15.5.9", "react": "^15.0.2", "react-dom": "^15.0.2", diff --git a/webpack.config.js b/webpack.config.js index 2c46af8..6d0e0a4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,6 +3,7 @@ var path = require('path'); var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); +var OpenBrowserPlugin = require('open-browser-webpack-plugin'); module.exports = { devtool: 'eval-source-map', @@ -24,6 +25,7 @@ module.exports = { inject: 'body', filename: 'index.html' }), + new OpenBrowserPlugin({ url: 'http://localhost:3000' }), new webpack.optimize.OccurenceOrderPlugin(), new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin(), diff --git a/yarn.lock b/yarn.lock index 8ec5daa..50ac7ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3155,6 +3155,12 @@ onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" +open-browser-webpack-plugin@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/open-browser-webpack-plugin/-/open-browser-webpack-plugin-0.0.5.tgz#5e6dc6f8b8797331e212985de218572d84c0521f" + dependencies: + open "0.0.5" + open@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/open/-/open-0.0.5.tgz#42c3e18ec95466b6bf0dc42f3a2945c3f0cad8fc"