Skip to content

Commit 717f007

Browse files
Fix adding the mapped controller asset as dependency
1 parent fefc61e commit 717f007

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/StimulusBundle/src/AssetMapper/StimulusLoaderJavaScriptCompiler.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
namespace Symfony\UX\StimulusBundle\AssetMapper;
1111

12-
use Symfony\Component\AssetMapper\AssetDependency;
1312
use Symfony\Component\AssetMapper\AssetMapperInterface;
1413
use Symfony\Component\AssetMapper\Compiler\AssetCompilerInterface;
1514
use Symfony\Component\AssetMapper\Compiler\AssetCompilerPathResolverTrait;
@@ -62,11 +61,7 @@ public function compile(string $content, MappedAsset $asset, AssetMapperInterfac
6261
* and mark it as a "content" dependency so that this file's contents
6362
* will be recalculated when the contents of any controller changes.
6463
*/
65-
$asset->addDependency(new AssetDependency(
66-
$mappedControllerAsset->asset,
67-
$mappedControllerAsset->isLazy,
68-
true,
69-
));
64+
$asset->addDependency($mappedControllerAsset->asset);
7065

7166
if ($mappedControllerAsset->isLazy) {
7267
$lazyControllers[] = sprintf('%s: () => import(%s)', json_encode($name), json_encode($relativeImportPath, \JSON_THROW_ON_ERROR | \JSON_UNESCAPED_SLASHES));

0 commit comments

Comments
 (0)