react-router-tutorial icon indicating copy to clipboard operation
react-router-tutorial copied to clipboard

Lesson 11 fix.

Open jakeecolution opened this issue 8 years ago • 3 comments

You output the bundle.js into the folder 'public' so you need to include to proper path in the index.html file now.

jakeecolution avatar Sep 26 '16 02:09 jakeecolution

@bryanj4 the index.html file references the script through a relative path currently ./bundle.js meaning the bundle.js file in the same folder. You may have missed the part of the tutorial that said the index.html file should also be put into the public folder.

I think the underlying issue that we should fix is that the tutorial tells the student to test out the server before moving the index.html and index.css files into the public folder. Simply telling the students to do this before testing would eliminate this problem.

jnelssonsmith avatar Oct 01 '16 03:10 jnelssonsmith

At the moment, after we make the proposed changes of lesson 11, the ones until "Congratulations! You now have a production server...", as bundle.js is inside /public, express will return the content of index.html instead of it.

This issue can easily be avoided by just removing the "In the root directly, go open up webpack.config.js and add the publicPath '/' as per below:" section.

cozmy avatar Oct 07 '16 09:10 cozmy

This looks like a fix for the problems of #218, for which the better solution might be to just not set the public path until after the production server is running. I recommend closing the PR.

merriam avatar Mar 21 '17 11:03 merriam