I am trying to setup react routing which works when I click on something on my site the route works, however if I open a new tab and copy that url. I get
Ref
Your webpack config is malformed. So your devServer is returning the fallback html file instead of the bundle.
Hence why the script is served with the ('text/html') MIME type.
devServer: {
historyApiFallback:{
index:'/dist/index.html'
},
}
You probably meant something like this:
devServer: {
historyApiFallback: true
}
https://webpack.js.org/configuration/dev-server/