Skip to content

Commit

Permalink
Properly add tags to services
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm committed Jun 28, 2019
1 parent 767a215 commit 3a3eac3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DependencyInjection/WebpackEncoreExtension.php
Expand Up @@ -82,7 +82,9 @@ private function entrypointFactory(ContainerBuilder $container, string $name, st
$name,
$strictMode,
];
$container->setDefinition($id, new Definition(EntrypointLookup::class, $arguments));
$definition = new Definition(EntrypointLookup::class, $arguments);
$definition->addTag('kernel.reset', ['method'=>'reset']);
$container->setDefinition($id, $definition);

return new Reference($id);
}
Expand Down
1 change: 1 addition & 0 deletions src/Resources/config/services.xml
Expand Up @@ -14,6 +14,7 @@
<service id="Symfony\WebpackEncoreBundle\Asset\EntrypointLookupCollectionInterface" alias="webpack_encore.entrypoint_lookup_collection" />

<service id="webpack_encore.tag_renderer" class="Symfony\WebpackEncoreBundle\Asset\TagRenderer">
<tag name="kernel.reset" method="reset" />
<argument type="service" id="webpack_encore.entrypoint_lookup_collection" />
<argument type="service" id="assets.packages" />
<argument type="collection" />
Expand Down

0 comments on commit 3a3eac3

Please sign in to comment.