[Bug]: Assets not loaded when running frontend alongside DCR locally #10538
Labels
Pick me up
small effort, self contained issues to do when you feel like a pick me up, waiting to be unblocked…
Rota
Any issues that have come in as part of rota. Useful for the person on rota to track their work.
Milestone
The dev workflow of running DCR alongside frontend is currently broken. We are attempting to load JavaScript assets from the wrong place, so JavaScript doesn't get loaded in this scenario.
You can run both frontend and DCR then hit the frontend port on localhost:
DCR's rendered output generates a relative path with a leading slash that roots the path:
Because you're hitting frontend at localhost:3000, the browser attempts to load asset scripts from:
Instead of:
First reported here.
@chrislomaxjones suggests taking inspiration from #5285 and #3471
It's possible this is a bug in frontend rather than DCR. If this is the case, we should probably write a check in frontend that loads paths beginning with /assets from localhost:3030 instead of localhost:3000.
The text was updated successfully, but these errors were encountered: