I try to setup nested routes for my react app like this
/ -> Home Page/about -> About Page/protected
basically wrap, your react app using instead of working fine without any webpack config modification, if you don't want to use HashRouter then you can free to use historyApiFallback: true in web pack dev server config on bottom of webpack.config file
like so
const config = {
........
devServer: {
compress: true,
port: 3000,
https: false,
historyApiFallback:true
}
}