Skip to content

Commit

Permalink
fix(webpack): fix webpack2 dev breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
STRML committed Feb 23, 2017
1 parent 03b64c9 commit 3dde3be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ clean:
rm -rf $(BUILD) $(DIST)

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

# Allows usage of `make install`, `make link`
install link:
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<html>
<head>
<script src="http://localhost:4002/bundle.js"></script>
<script src="/bundle.js"></script>
<title>RGL Example</title>
</head>
<body>
<h3>React-Grid-Layout Dev</h3>
<p>Try dragging the elements around.</p>
<p>If you don't see any content, run webpack (<span style="font-family:monospace">npm run dev</span>)
<p>If you don't see any content, run webpack (<span style="font-family:monospace">npm run dev</span>)
and load this file from the server it opens.</p>
<div id="content"></div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions webpack-dev-server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
context: __dirname,
entry: "./test/dev-hook.jsx",
output: {
path: path.join(__dirname, "dist"),
path: '/',
filename: "bundle.js",
sourceMapFilename: "[file].map",
},
Expand Down Expand Up @@ -40,7 +40,7 @@ module.exports = {
],
devtool: "eval",
devServer: {
publicPath: '/examples/',
publicPath: '/',
compress: true,
port: 4002
},
Expand Down

0 comments on commit 3dde3be

Please sign in to comment.