Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Fix typo and readme bug #312

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Next Next commit
Fix typo and readme bug
On line 70 the production server can not find the bundle.js
file because webpack.config.js pushes the bundle.js into the
/public path. The result is a blank page because the
server has not been set up with the proper path of /public.
The Webpack configuration must be applied after the public
directory has been created on line 80 or once the server has
been configured to read from the public directory.
  • Loading branch information
ruelasb committed Mar 27, 2017
commit 4d93111cc28fe28d629dfcb7b3a040e2ff8b002b
11 changes: 9 additions & 2 deletions lessons/11-productionish-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ In the root directly, go open up `webpack.config.js` and add the publicPath '/'
```
// webpack.config.js
output: {
path: 'public',
filename: 'bundle.js',
publicPath: '/'
},
Expand Down Expand Up @@ -78,7 +77,15 @@ clicking around, try navigating to [http://localhost:8080/package.json](http://l
Whoops. Let's fix that. We're going to shuffle around a couple files and
update some paths scattered across the app.

1. make a `public` directory.
1. Make a `public` directory and update `webpack.config.js` again...
```
//webpack.config.js
output: {
path: 'public',
filename: 'bundle.js',
publicPath: '/'
}
```
2. Move `index.html` and `index.css` into it.

Now let's update `server.js` to point to the right directory for static
Expand Down