Skip to content

Commit

Permalink
Added support for routeNotFoundUseDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
visto9259 committed Jan 31, 2023
1 parent c400007 commit ce35517
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Config/WebpackOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public function setRouteNotFoundUseDefault(bool $flag)
{
$this->routeNotFoundUseDefault = $flag;
}

/**
* @param $routeMatched string
* @return array
Expand All @@ -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 [];
}
Expand Down

0 comments on commit ce35517

Please sign in to comment.