-if (!function_exists('versioned_asset')) {
- /**
- * Get the path to a versioned file.
- *
- * @param string $file
- * @return string
- *
- * @throws \InvalidArgumentException
- */
- function versioned_asset($file)
- {
- static $manifest = null;
-
- if (is_null($manifest)) {
- $manifest = json_decode(file_get_contents(public_path('build/manifest.json')), true);
- }
-
- if (isset($manifest[$file])) {
- return baseUrl($manifest[$file]);
- }
+/**
+ * Get the path to a versioned file.
+ * @throws Exception
+ */
+function versioned_asset(string $file = ''): string
+{
+ static $version = null;