@@ -144,15 +144,12 @@ functions to specify which build to use:
144144 {{ encore_entry_script_tags('mobile', null, 'secondConfig') }}
145145 {{ encore_entry_link_tags('mobile', null, 'secondConfig') }}
146146
147- Avoid missing CSS when render multiples html
148- --------------------------------------------
147+ Avoid Missing CSS When Rendering Multiple Templates
148+ ---------------------------------------------------
149149
150- When you need to generate two templates in the same request, such as two emails, you should call the reset method on
151- the ``EntrypointLookupInterface `` interface.
152-
153- To do this, inject the ``EntrypointLookupInterface `` interface
154-
155- .. code-block :: php
150+ When you render two or more templates in the same request, such as two emails,
151+ you should call the ``reset() `` method on the ``EntrypointLookupInterface `` interface.
152+ To do this, inject the ``EntrypointLookupInterface `` interface::
156153
157154 public function __construct(EntrypointLookupInterface $entryPointLookup) {}
158155
@@ -162,14 +159,13 @@ To do this, inject the ``EntrypointLookupInterface`` interface
162159 $this->render($emailTwo);
163160 }
164161
165- If you are using multiple webpack configurations, for example, one for the admin and one for emails, you will need to
166- inject the correct ``EntrypointLookupInterface `` service. To achieve this, you should search for the service
167- using the following command:
162+ If you are using multiple Webpack configurations (e.g. one for the admin and one
163+ for emails) you will need to inject the right ``EntrypointLookupInterface `` service.
164+ Use the following command to find the right service :
168165
169166.. code-block :: terminal
170167
171- # if you are using symfony CLI
172- $ symfony console debug:container entrypoint_lookup
168+ $ php bin/console console debug:container entrypoint_lookup
173169
174170 # You will see a result similar to this:
175171 Select one of the following services to display its information:
@@ -179,18 +175,19 @@ using the following command:
179175 [3] webpack_encore.entrypoint_lookup[admin]
180176 [4] webpack_encore.entrypoint_lookup[email]
181177
182- The service we are interested in is ``webpack_encore.entrypoint_lookup[email] ``.
178+ In this example, the configuration related to the ``email `` configuration is
179+ the one called ``webpack_encore.entrypoint_lookup[email] ``.
183180
184- To inject this service into your class, we will use the bind method :
181+ To inject this service into your class, use the `` bind `` option :
185182
186183.. code-block :: yaml
187184
185+ # config/services.yaml
188186 services :
189187 _defaults
190188 bind :
191189 Symfony\WebpackEncoreBundle\Asset\EntrypointLookupInterface $entryPointLookupEmail : ' @webpack_encore.entrypoint_lookup[email]'
192190
193-
194191 Now you can inject your service into your class:
195192
196193.. code-block :: php
0 commit comments