Skip to content

Commit ca945fa

Browse files
authored
Merge pull request #61 from ByteInternet/add-enableHighPerformanceStaticDeploy
Add enableHighPerformanceStaticDeploy option in Magento2 application template
2 parents 9925cff + 7929f96 commit ca945fa

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/ApplicationTemplate/Magento2.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,24 @@ public function setMagentoBackendThemes(array $themes): void
8080
$this->setVariable('magento_themes_backend', $themes);
8181
$this->setVariable('split_static_deployment', true);
8282
}
83+
84+
/**
85+
* Enable high-performance static content deployment using elgentos/magento2-static-deploy.
86+
*
87+
* This uses a Go-based static content deployer that is 230-380x faster than the native
88+
* Magento setup:static-content:deploy command. It automatically handles both Hyvä themes
89+
* (using fast Go deployment) and Luma themes (dispatching to bin/magento).
90+
*
91+
* Requirements:
92+
* - Themes must be set using setMagentoThemes() with locale mapping (e.g., ['Vendor/theme' => 'nl_NL en_US'])
93+
*
94+
* @param bool $enabled Whether to enable high-performance static deployment (default: true)
95+
* @see https://github.com/elgentos/magento2-static-deploy
96+
*/
97+
public function enableHighPerformanceStaticDeploy(bool $enabled = true): self
98+
{
99+
$this->setVariable('high_performance_static_deploy', $enabled);
100+
101+
return $this;
102+
}
83103
}

0 commit comments

Comments
 (0)