From cd744eaf7635d7b5799f4308c93fb22d55fcbd3d Mon Sep 17 00:00:00 2001 From: YarnBall Date: Wed, 24 Aug 2016 13:36:36 +1000 Subject: [PATCH] Missing step- adding path the webpack.js Raised issue, asked to to PR. https://github.com/reactjs/react-router-tutorial/issues/218#issuecomment-241829117 --- lessons/11-productionish-server/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lessons/11-productionish-server/README.md b/lessons/11-productionish-server/README.md index 0dc31466..1ddfd278 100644 --- a/lessons/11-productionish-server/README.md +++ b/lessons/11-productionish-server/README.md @@ -27,6 +27,16 @@ scripts entry in package.json to look like this: }, ``` +In the root directly, go open up `webpack.config.js` and add the publicPath '/' as per below: +``` +// webpack.config.js + output: { + path: 'public', + filename: 'bundle.js', + publicPath: '/' + }, +``` + When you run `npm start` it checks if the value of our `NODE_ENV` environment variable is `production`. If yes, it runs `npm run start:prod`, if not, it runs `npm run start:dev`.