Skip to content

Commit 5eb03f6

Browse files
committed
minor #14037 Update dev-server.rst (claytron5000)
This PR was submitted for the 5.1 branch but it was merged into the 4.4 branch instead. Discussion ---------- Update dev-server.rst Clarify how the dev-server runs as a proxy for front end assets. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 1f34288 Update dev-server.rst
2 parents a2f5208 + 1f34288 commit 5eb03f6

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

frontend/encore/dev-server.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ While developing, instead of using ``yarn encore dev --watch``, you can use the
88
99
$ yarn encore dev-server
1010
11-
This serves the built assets from a new server at ``http://localhost:8080`` (it does
12-
not actually write any files to disk). This means your ``script`` and ``link`` tags
13-
need to change to point to this.
14-
15-
If you're using the ``encore_entry_script_tags()`` and ``encore_entry_link_tags()``
16-
Twig shortcuts (or are :ref:`processing your assets through entrypoints.json <load-manifest-files>`
17-
in some other way), you're done: the paths in your templates will automatically point
18-
to the dev server.
11+
This builds and serves the front-end assets from a new server. This server runs at
12+
``localhost:8080`` by default, meaning your build assets are available at ``localhost:8080/build``.
13+
This server does not actually write the files to disk; instead it servers them from memory,
14+
allowing for hot module reloading.
15+
16+
As a consequence, the ``link`` and ``script`` tags need to point to the new server. If you're using the
17+
``encore_entry_script_tags()`` and ``encore_entry_link_tags()`` Twig shortcuts (or are
18+
:ref:`processing your assets through entrypoints.json <load-manifest-files>` in some other way),
19+
you're done: the paths in your templates will automatically point to the dev server.
1920

2021
The ``dev-server`` command supports all the options defined by `webpack-dev-server`_.
2122
You can set these options via command line options:

0 commit comments

Comments
 (0)