devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Host static output at subpath

Open arkadiusz-swierczek-pm opened this issue 3 months ago • 2 comments

Hello

I'm looking for a solution that would allow me to build static files for the devtool and deploy them to some hosting under a dynamic path that is known at generation time.

The page doesn't load correctly because the logic redirects the user to the /__devtools/ path. However, if my files are located in the /ci-build-123456 directory, I would expect to be redirected to /ci-build-123456/__devtools/ instead.

I've tried setting the base field in vite.config.ts to ./, ci-build-123456, and ./ci-build-123456, but none of them worked.

arkadiusz-swierczek-pm avatar Sep 02 '26 08:09 arkadiusz-swierczek-pm

Hi @antfu

Thank you for the PR. We are closer to the working solution now.

Please take a look for at the repo and run the following commands:

npm ci
npm run build -- --base /ci-build-123456/
node server.ts
Image Image

arkadiusz-swierczek-pm avatar Sep 04 '26 08:09 arkadiusz-swierczek-pm

Hi @antfu

Can I ask you to reopen the issue? Or maybe I should create new ticket with above errors?

arkadiusz-swierczek-pm avatar Sep 13 '26 19:09 arkadiusz-swierczek-pm