strategy = $strategy; $this->filesystem = $filesystem; } /** * {@inheritdoc} */ public function merge(array $assetsToMerge, \Magento\Framework\View\Asset\LocalInterface $resultAsset) { $dir = $this->filesystem->getDirectoryRead(DirectoryList::STATIC_VIEW); if (!$dir->isExist($resultAsset->getPath())) { $this->strategy->merge($assetsToMerge, $resultAsset); } } }