Skip to content

Commit

Permalink
Add clean up for empty vite function
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Jul 2, 2022
1 parent 6435037 commit ec4ac09
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ private function updateAppLayoutsUsingVite()
"\\1\\2\\3\n\\1<x-importmap-tags />",
File::get($file),
),
));
))
->each(fn ($file) => File::put(
$file,
preg_replace(
'/.*\@vite\(\[\]\).*\n/',
'',
File::get($file),
),
))

return self::SUCCESS;
});
Expand Down

0 comments on commit ec4ac09

Please sign in to comment.