Skip to content

Commit 6f28251

Browse files
committed
bug #59 Only add alias to EntrypointLookupInterface if default build is enabled (emodric)
This PR was merged into the master branch. Discussion ---------- Only add alias to EntrypointLookupInterface if default build is enabled Caused by the combination of 64f1e94 and #37 The commit in question was added after the commits in my PR #37, so it slipped through the cracks. Commits ------- 315955f Only add alias to EntrypointLookupInterface if default built is enabled
2 parents 1590eeb + 315955f commit 6f28251

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)