Skip to content

Commit 11220f7

Browse files
author
Ashwin Hegde
committed
Merge pull request #8 from hegdeashwin/develop
Adds a work around for browser load integration issue
2 parents 62ed77f + 847c7c8 commit 11220f7

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

codes/example-10/webpack.config.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
var OpenBrowserPlugin = require('open-browser-webpack-plugin');
1+
// var OpenBrowserPlugin = require('open-browser-webpack-plugin');
2+
var open = require("open");
23

34
module.exports = {
45
entry: './entry.js',
56
output: {
67
filename: 'bundle.js'
78
},
89
plugins: [
9-
new OpenBrowserPlugin({
10-
url: 'http://localhost:8080'
11-
})
12-
]
10+
// new OpenBrowserPlugin({
11+
// url: 'http://localhost:3000'
12+
// }) // plugin is having issue https://github.com/baldore/open-browser-webpack-plugin/issues/4
13+
],
14+
devServer: {
15+
port: 3000 // setting webpack-dev-server port
16+
}
1317
};
18+
19+
open("http://localhost:3000", "firefox");

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"homepage": "https://github.com/hegdeashwin/learning-webpack#readme",
2424
"devDependencies": {
2525
"css-loader": "^0.23.0",
26+
"open": "0.0.5",
2627
"open-browser-webpack-plugin": "0.0.1",
2728
"style-loader": "^0.13.0"
2829
}

0 commit comments

Comments
 (0)