loading-screen icon indicating copy to clipboard operation
loading-screen copied to clipboard

Configurable `_loading` Path for Module Middleware

Open aturingmachine opened this issue 3 years ago • 4 comments

Curious as to why the route _loading is not configurable. Seems we can tweak most things about how the loading setup is configured however this route cannot be placed at a different location except via configuring the router base. I am wondering if this is something that could be implemented, and potentially a PR welcomed, or if there is something prohibiting this that I am unaware of.

Server Middleware in question

aturingmachine avatar Aug 26 '21 14:08 aturingmachine

Hi @aturingmachine. Sure we can make it configurable and quickly checking, prefix is not hardcoded anywhere else. PR welcome 👍 (and would be nice if you can also explain why this change is required)

pi0 avatar Aug 26 '21 14:08 pi0

Hi @aturingmachine. Sure we can make it configurable and quickly checking, prefix is not hardcoded anywhere else. PR welcome 👍 (and would be nice if you can also explain why this change is required)

Awesome, I can take a crack at it later.

We have a very odd use case to be honest. We are using nginx to proxy some of our traffic to our Nuxt stack, however some of that traffic will not be under a basePath. To resolve we have configured all the dev endpoints to be under this psuedo-basePath (webpack hot module, dev server, etc) and the last one I could not figure out was the /_loading/sse call that is made. I am pretty sure the middleware I linked in the OP is the correct endpoint.

aturingmachine avatar Aug 26 '21 15:08 aturingmachine

Hi @pi0 and @aturingmachine. Would it be possible for changing path: '/_loading', to path: options.baseURL, ?

yulinyeh avatar Jan 28 '22 17:01 yulinyeh

@yulinyeh I currently have a PR open (#86) that sets path to options.middlewarePath that has been open for a while.

aturingmachine avatar Jan 28 '22 18:01 aturingmachine