Skip to content

Commit a5cbeaf

Browse files
committed
minor #19792 [AssetMapper][Encore] document switching from AssetMapper to Encore (kbond)
This PR was merged into the 6.4 branch. Discussion ---------- [AssetMapper][Encore] document switching from AssetMapper to Encore There are some flex-related nuances when switching the default webapp from AssetMapper to Encore. This documents the proper steps to have a clean conversion. Commits ------- 2c8bc90 [AssetMapper][Encore] document switching from AssetMapper to Encore
2 parents aa10b80 + 2c8bc90 commit a5cbeaf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

frontend.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,26 @@ pre-processing CSS & JS and compiling and minifying assets.
7878

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

81+
Switch from AssetMapper
82+
^^^^^^^^^^^^^^^^^^^^^^^
83+
84+
By default, new Symfony webapp projects (created with ``symfony new --webapp myapp``)
85+
use AssetMapper. If you still need to use Webpack Encore, use the following steps to
86+
switch. This is best done on a new project and provides the same features (Turbo/Stimulus)
87+
as the default webapp.
88+
89+
.. code-block:: terminal
90+
91+
# Remove AssetMapper & Turbo/Stimulus temporarily
92+
$ composer remove symfony/ux-turbo symfony/asset-mapper symfony/stimulus-bundle
93+
94+
# Add Webpack Encore & Turbo/Stimulus back
95+
$ composer require symfony/webpack-encore-bundle symfony/ux-turbo symfony/stimulus-bundle
96+
97+
# Install & Build Assets
98+
$ npm install
99+
$ npm run dev
100+
81101
Stimulus & Symfony UX Components
82102
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
83103

0 commit comments

Comments
 (0)