Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/Illuminate/Foundation/Vite.php
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ public function content($asset, $buildDirectory = null)

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

$path = public_path($buildDirectory.'/'.$chunk['file']);
$path = $this->publicPath($buildDirectory.'/'.$chunk['file']);

if (! is_file($path) || ! file_exists($path)) {
throw new ViteException("Unable to locate file from Vite manifest: {$path}.");
Expand All @@ -918,6 +918,17 @@ protected function assetPath($path, $secure = null)
return ($this->assetPathResolver ?? asset(...))($path, $secure);
}

/**
* Generate a public path for an asset.
*
* @param string $path
* @return string
*/
protected function publicPath($path)
{
return public_path($path);
}

/**
* Get the manifest file for the given build directory.
*
Expand Down