Skip to content

Configuration for webpack dev-server in vm/docker for rebound host interfaces #9343

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions frontend/encore/dev-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,19 @@ to bind to all IP addresses and allow any host to access the server:

.. code-block:: terminal

$ ./node_modules/.bin/encore dev-server --host 0.0.0.0 --disable-host-check
$ ./node_modules/.bin/encore dev-server --public http://docker-host:9000 --port 9000 --host 0.0.0.0 --disable-host-check

You can now access the dev-server using the IP address to your virtual machine on
port 8080 - e.g. http://192.168.1.1:8080.
port 9000 - e.g. http://192.168.1.1:9000.
If you've activated the :ref:`manifest.json versioning <load-manifest-files>` you need additional configuration to alter the url used in your templates to the ``dev-server``:

.. code-block:: javascript

Encore
.setManifestKeyPrefix('build/')

When you're using the ``dev-server`` in a docker container, configure accordingly and bind the port from the ``dev-server`` (default 8080) onto a port on the host and provide this port --public parameter above.


Hot Module Replacement HMR
--------------------------
Expand Down