Skip to content

Commit

Permalink
Missing step- adding path the webpack.js (#224)
Browse files Browse the repository at this point in the history
Raised issue, asked to to PR.

reactjs/react-router-tutorial#218 (comment)
  • Loading branch information
yarnball authored and gitpash committed Apr 20, 2017
1 parent 5584f5c commit 36e4008
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lessons/11-productionish-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 36e4008

Please sign in to comment.