-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HMR / dev-server is not working inside a VM despite the documentation #277
Comments
Hi @tristanbes, There was another issue about using The PR that fixed it (#96) made it possible to use an URL when calling It was also supposed to add a |
The PR #96 fixes the problem.
// .. rest of configuration
if (!Encore.isProduction()) {
Encore
.setPublicPath('http://enigma.vm:8080/build/')
.setManifestKeyPrefix('build/')
;
}
Thanks @Lyrkan |
Is there some documentation we can update to help make this easier? |
Yes, maybe this one ? https://symfony.com/doc/current/frontend/encore/dev-server.html |
I'm sorry but i can't get it to work properly with this confg with a docker and symfony 3.4.
And in twig file: I keep getting connection reset or 404 errors and i can't find a proper docker configuration. |
I've just opened symfony/symfony-docs#11422 that should help |
…cal) This PR was squashed before being merged into the 3.4 branch (closes #11422). Discussion ---------- Encore: add guide to use Encore in a virtual machine Hi, ✋ As the title says, this PR add a new guide for using Encore in a virtual machine. This is what we use on ours Symfony apps at work which run inside a Vagrant VM. It works really fine and I thought it would be helpful to share it with other people. Also, I've removed a sub-section in the actual doc because according to symfony/webpack-encore#277, it was not working because some additional configuration was missing (and I can confirm it because I'm one of his co-worker 😛). Commits ------- 86c897f Encore: add guide to use Encore in a virtual machine
Hello,
We're facing a problem while trying to run HMR:
building with
accessing http://enigma.vm/login, the assets are trying to load from
http://0.0.0.0:8000/build/login.css
but the local traffic is redirected on enigma.vm. so
http://0.0.0.0:8000
does not answer.yet,
http://enigma.vm:8000/build/home.css
serve the right asset.When trying something different:
The assets is correctly served from the server
http://enigma.vm:8000/build/home.css
But when trying to access
http://enigma.vm/login
, then the assets are loaded fromhttp://enigma.vm:8000/build/login.css
which reply withnet::ERR_CONNECTION_REFUSED
My frontend dev is 100% blaming
webpack-encore
, and say this would never happened running webpack without the wrapper. I'm sad because I was an advocate to encore.... help me prove him wrong ;-)PS i've read #126 thought it would help me, but it's not :(
The text was updated successfully, but these errors were encountered: