Description
Hi,
The option encore dev-server --public
used to work to specify which host to use in the manifest.json symfony assets file.
But in the current version (1.6.1), this option fails:
ban@na:/var/www/html$ ./node_modules/.bin/encore dev-server --public http://192.168.1.22:8000
Running webpack-dev-server ...
[webpack-cli] Error: Unknown option '--public'
[webpack-cli] Run 'webpack --help' to see available commands and options
Looking at webpack-encore code, apparently this is expected to be still working (at least it’s tested):
webpack-encore/test/config/parse-runtime.js
Lines 96 to 101 in 8c2752a
Versions
Package | Version |
---|---|
webpack-encore | 1.6.1 |
webpack-dev-server | 4.1.1 |
Notes about our use case
We use webpack-encore in a docker-compose environment. With the encore dev-server running in its own container, and the symfony app in another.
This setup works very well (serving assets and livereload) as long as the browser shares the same host as the docker containers (0.0.0.0, or localhost is ok). But, we are testing with real devices on the local network (with ips like 192.168.0.12, or even virtualhosts), and currently it seems that we cannot specify the public host to put in the manifest.json.
Thanks :)