From 3dde3be9bec7188f0755440ee6efe9c9b9c7a014 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Thu, 23 Feb 2017 00:30:03 -0600 Subject: [PATCH] fix(webpack): fix webpack2 dev breakage --- Makefile | 3 +-- index.html | 4 ++-- webpack-dev-server.config.js | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 933c98b57..5f9d3ad13 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/index.html b/index.html index aeaa0767f..4eec2abf7 100644 --- a/index.html +++ b/index.html @@ -1,12 +1,12 @@ - + RGL Example

React-Grid-Layout Dev

Try dragging the elements around.

-

If you don't see any content, run webpack (npm run dev) +

If you don't see any content, run webpack (npm run dev) and load this file from the server it opens.

diff --git a/webpack-dev-server.config.js b/webpack-dev-server.config.js index 914fbb940..354f89188 100644 --- a/webpack-dev-server.config.js +++ b/webpack-dev-server.config.js @@ -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", }, @@ -40,7 +40,7 @@ module.exports = { ], devtool: "eval", devServer: { - publicPath: '/examples/', + publicPath: '/', compress: true, port: 4002 },