Skip to content

Commit 315955f

Browse files
authored
Only add alias to EntrypointLookupInterface if default built is enabled
1 parent fc18456 commit 315955f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/DependencyInjection/WebpackEncoreExtension.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ public function load(array $configs, ContainerBuilder $container)
5050

5151
$container->getDefinition('webpack_encore.entrypoint_lookup_collection')
5252
->replaceArgument(0, ServiceLocatorTagPass::register($container, $factories));
53-
$container->setAlias(EntrypointLookupInterface::class, new Alias($this->getEntrypointServiceId('_default')));
53+
54+
if (false !== $config['output_path']) {
55+
$container->setAlias(EntrypointLookupInterface::class, new Alias($this->getEntrypointServiceId('_default')));
56+
}
5457
}
5558

5659
private function entrypointFactory(ContainerBuilder $container, string $name, string $path, bool $cacheEnabled): Reference

0 commit comments

Comments
 (0)