Skip to content

Commit 2f2ec3e

Browse files
committed
Skip transferring media files when using CDN
1 parent b462190 commit 2f2ec3e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/framework/src/Framework/Actions/PreBuildTasks/TransferMediaAssets.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Hyde\Framework\Actions\PreBuildTasks;
66

7+
use Hyde\Facades\Config;
78
use Hyde\Facades\Filesystem;
89
use Hyde\Support\Filesystem\MediaFile;
910
use Hyde\Framework\Features\BuildTasks\PreBuildTask;
@@ -23,6 +24,10 @@ public function handle(): void
2324
$this->skip("No media files to transfer.\n");
2425
}
2526

27+
if (Config::getBool('hyde.load_app_styles_from_cdn') && MediaFile::files() === ['app.css']) {
28+
$this->skip("No media files to transfer, using CDN.\n");
29+
}
30+
2631
$this->withProgressBar(MediaFile::all(), function (MediaFile $file): void {
2732
$sitePath = $file->getOutputPath();
2833
$this->needsParentDirectory($sitePath);

0 commit comments

Comments
 (0)