Skip to content

Commit 3dde3be

Browse files
committed
fix(webpack): fix webpack2 dev breakage
1 parent 03b64c9 commit 3dde3be

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ clean:
1818
rm -rf $(BUILD) $(DIST)
1919

2020
dev:
21-
echo 'Open http://localhost:4002'
22-
@$(BIN)/webpack-dev-server --config webpack-dev-server.config.js --hot --progress --colors --port 4002 --content-base .
21+
@$(BIN)/webpack-dev-server --config webpack-dev-server.config.js --hot --progress --colors --port 4002 --open --content-base .
2322

2423
# Allows usage of `make install`, `make link`
2524
install link:

index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<html>
22
<head>
3-
<script src="http://localhost:4002/bundle.js"></script>
3+
<script src="/bundle.js"></script>
44
<title>RGL Example</title>
55
</head>
66
<body>
77
<h3>React-Grid-Layout Dev</h3>
88
<p>Try dragging the elements around.</p>
9-
<p>If you don't see any content, run webpack (<span style="font-family:monospace">npm run dev</span>)
9+
<p>If you don't see any content, run webpack (<span style="font-family:monospace">npm run dev</span>)
1010
and load this file from the server it opens.</p>
1111
<div id="content"></div>
1212
</body>

webpack-dev-server.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
context: __dirname,
66
entry: "./test/dev-hook.jsx",
77
output: {
8-
path: path.join(__dirname, "dist"),
8+
path: '/',
99
filename: "bundle.js",
1010
sourceMapFilename: "[file].map",
1111
},
@@ -40,7 +40,7 @@ module.exports = {
4040
],
4141
devtool: "eval",
4242
devServer: {
43-
publicPath: '/examples/',
43+
publicPath: '/',
4444
compress: true,
4545
port: 4002
4646
},

0 commit comments

Comments
 (0)