From ce35517e16611888ca1d1de17f940fa5598efdd1 Mon Sep 17 00:00:00 2001 From: Eric Richer Date: Tue, 31 Jan 2023 14:24:24 -0500 Subject: [PATCH] Added support for routeNotFoundUseDefault --- src/Config/WebpackOptions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Config/WebpackOptions.php b/src/Config/WebpackOptions.php index 10d02e5..0a11774 100644 --- a/src/Config/WebpackOptions.php +++ b/src/Config/WebpackOptions.php @@ -78,6 +78,7 @@ public function setRouteNotFoundUseDefault(bool $flag) { $this->routeNotFoundUseDefault = $flag; } + /** * @param $routeMatched string * @return array @@ -102,6 +103,7 @@ public function getScriptListByRoute($routeMatched) return $this->entry_point_map[$this->default_entry_point]; } } + // No matching route found, check if default is used if ($this->routeNotFoundUseDefault) return $this->getScriptListByTemplate(); else return []; }