diff --git a/src/Illuminate/Foundation/Vite.php b/src/Illuminate/Foundation/Vite.php index 7922f830925..a31ff4e34df 100644 --- a/src/Illuminate/Foundation/Vite.php +++ b/src/Illuminate/Foundation/Vite.php @@ -175,6 +175,20 @@ public function withEntryPoints($entryPoints) return $this; } + /** + * Merge additional Vite entry points with the current set. + * + * @param array $entryPoints + * @return $this + */ + public function mergeEntryPoints($entryPoints) + { + return $this->withEntryPoints(array_unique([ + ...$this->entryPoints, + ...$entryPoints, + ])); + } + /** * Set the filename for the manifest file. *