Skip to content

Commit

Permalink
🎨 Prevent double build paths when resolving a Vite asset
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x committed Feb 7, 2025
1 parent 2959c9a commit 5f6777f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Roots/Acorn/Assets/Vite.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Illuminate\Foundation\Vite as FoundationVite;

use function Roots\asset;

class Vite extends FoundationVite
{
/**
Expand All @@ -15,6 +17,6 @@ class Vite extends FoundationVite
*/
protected function assetPath($path, $secure = null)
{
return \Roots\asset($path)->uri();
return str_replace('/build/build', '/build', asset($path)->uri());
}
}

0 comments on commit 5f6777f

Please sign in to comment.