Closed D3strukt0r closed 1 month ago
hi @D3strukt0r ,
have you tried the proxy_origin
option for the vite-bundle ? documentation it seems that this can solve your issue. source code
Alright, had to update to 7.0.4 and then it worked, I guess you got idea the same moment i came to the issue :P
Thanks again :)
vite-plugin-symfony version
7.0.3
vite-bundle version
7.0.3
your OS, node version, Symfony version, PHP version
Debian Docker Container, Node 18.20.4, Symfony 6.4.10, PHP 8.3.10
Description
Hello again. I wanted to let you know that the
/_profiler/vite
route doesn't work for how we manage projects at work.the relevant vite.config.js
to manage all the different projects at work, we have a central Traefik instance on a MacBook. Now we got two containers, one being Nginx and another one being PHP-FPM (& Node.js)
requests for
my-project.test:443
go to the nginx container, and the vite dev server is running in the fpm container accessible throughdevserver.my-project.test:443
(mapped to 5173)to visualize what is mean, here are what the labels look like:
this allows us to have multiple projects running at the same time and basically vite dev server also runs. but because what is set in
server.origin
your library seems to think it can talk to vite with the same address (both being in the same container, php & vite), but that's not the case, because it would have to behttp://localhost:5173
instead (or another hostname if vite was running on a different service). What I'm saying is this should be configurable separately.Crafts Vite Plugin (https://nystudio107.com/docs/vite/) solves this by providing a
devServerInternal
which for other projects we have set tohttp://localhost:5173
anddevServerPublic
tohttps://devserver.my-project.test
How to reproduce
everything is in the description :)
Possible Solution
Allow configuring something like
devServerInternal