Skip to content

Commit

Permalink
Merge branch '7.0' into 7.1
Browse files Browse the repository at this point in the history
* 7.0:
  [AssetMapper][Encore] document switching from AssetMapper to Encore
  • Loading branch information
javiereguiluz committed Apr 16, 2024
2 parents 7e3f35e + d6a0282 commit d0f50b3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions frontend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,26 @@ pre-processing CSS & JS and compiling and minifying assets.

:doc:`Read the Encore Documentation </frontend/encore/index>`

Switch from AssetMapper
^^^^^^^^^^^^^^^^^^^^^^^

By default, new Symfony webapp projects (created with ``symfony new --webapp myapp``)
use AssetMapper. If you still need to use Webpack Encore, use the following steps to
switch. This is best done on a new project and provides the same features (Turbo/Stimulus)
as the default webapp.

.. code-block:: terminal
# Remove AssetMapper & Turbo/Stimulus temporarily
$ composer remove symfony/ux-turbo symfony/asset-mapper symfony/stimulus-bundle
# Add Webpack Encore & Turbo/Stimulus back
$ composer require symfony/webpack-encore-bundle symfony/ux-turbo symfony/stimulus-bundle
# Install & Build Assets
$ npm install
$ npm run dev
Stimulus & Symfony UX Components
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit d0f50b3

Please sign in to comment.