Error fro react-router-dom when refreshing the web page

I have a page with job offers at http://localhost:3000/offers. When I go to any vacancy, eg. http://localhost:3000/offers/1 where 1 is a parameter, I am redirected to the page with the offer.

However if I refresh the page, I get an error:
GET http://localhost:3000/offers/main.53268a2871a415dae5af.js net::ERR_ABORTED 404 (Not Found)
1:11 Refused to execute script from ‘http://localhost:3000/offers/main.53268a2871a415dae5af.js
This is because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.

Perhaps I configured something wrong in webpack.config.ts.

I would be very grateful for any help!

Full source code: https://github.com/nikitazapekin/worklist-application

Perhaps I configured something wrong in webpack.config.ts.