webpack-example
webpack-example copied to clipboard
webpack output publicPath
Hi Richard! I followed your tutorial to build a rails app as an api with react front end on a separate node.js server. It seems like your webpack.config.js file, instead of having
output: { // ... publicPath: '', // ... }
it should've been
output: { // ... publicPath: '/', // ... }
otherwise you cannot access the module.js file in a nested url. I was searching up this error and I found this: [https://github.com/reactjs/react-router/issues/676]
Might not be relevant to your tutorial but just something I found that might be useful!