Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of express server, just use webpack-dev-server #53

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "src/main.js",
"scripts": {
"postinstall": "npm run build",
"server": "node start.js",
"server": "webpack-dev-server --config webpack.local.config.js",
"build": "webpack -p --progress --config webpack.production.config.js",
"test": "nyc ava --fail-fast --verbose --require babel-register",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
Expand Down Expand Up @@ -54,7 +54,6 @@
"babel-core": "^6.5.2",
"babel-polyfill": "^6.5.0",
"babel-runtime": "^6.5.0",
"express": "^4.12.3",
"react": "^15.0.1",
"react-dom": "^15.0.1",
"react-router": "^2.0.0"
Expand Down
76 changes: 0 additions & 76 deletions server.js

This file was deleted.

5 changes: 0 additions & 5 deletions start.js

This file was deleted.

9 changes: 7 additions & 2 deletions webpack.local.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ module.exports = {

// Efficiently evaluate modules with source maps
devtool: "eval",

// Load the build directory on the webpack server's "/" URI
devServer: {
contentBase: "./build",
hot: true,
open: true,
},

// Set entry point to ./src/main and include necessary files for hot load
entry: [
"webpack-dev-server/client?http://localhost:9090",
"webpack/hot/only-dev-server",
"./src/main"
],

Expand Down