Skip to content

Commit

Permalink
Added CDN improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaskleinschmidt authored Sep 5, 2023
1 parent 1679a70 commit ad08ae9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Vite.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function __invoke(array|string $entries, string $buildDirectory = null):

$args = [
$key,
asset($buildDirectory . '/'. $file = $chunk['file']),
url($buildDirectory . '/'. $file = $chunk['file']),
$chunk,
$manifest,
];
Expand All @@ -156,7 +156,7 @@ public function __invoke(array|string $entries, string $buildDirectory = null):
if (! isset($preloads[$file])) {
$preloads[$file] = $this->makePreloadTag(
$key,
asset($buildDirectory . '/'. $file),
url($buildDirectory . '/'. $file),
$chunk,
$manifest,
);
Expand All @@ -172,7 +172,7 @@ public function __invoke(array|string $entries, string $buildDirectory = null):

$args = [
$key,
asset($buildDirectory . '/'. $file),
url($buildDirectory . '/'. $file),
$chunk,
$manifest,
];
Expand All @@ -197,7 +197,7 @@ public function __invoke(array|string $entries, string $buildDirectory = null):

$args = [
$key,
asset($buildDirectory . '/'. $file),
url($buildDirectory . '/'. $file),
$chunk,
$manifest,
];
Expand Down Expand Up @@ -415,7 +415,7 @@ public function asset(string $asset, string $buildDirectory = null): string

$chunk = $this->chunk($this->manifest($buildDirectory), $asset);

return asset($buildDirectory . '/' . $chunk['file'])->url();
return url($buildDirectory . '/' . $chunk['file']);
}

/**
Expand Down

0 comments on commit ad08ae9

Please sign in to comment.