Js error caused by react-route v4 BrowserRouter packaging and placing in server nested sub-routing page refresh

I use packaged publishing in react-route v4 BrowserRouter to put it on the server.
but the refresh page introduces the correct route refresh page js at the first level

.

clipboard.png

clipboard.png
find the cause, It is found that the package file introduced by
:8009/app/static/css/1.a21335cf.chunk.css
adds a path of first-level routing.
the normal introduction path is:
http://test.jucailin.com:8009/static/css/1.a21335cf.chunk.css
, how to solve


what does your dist directory structure look like?

I think I need to configure publicPath

.

how did you solve this problem, brother?

Menu