diff --git a/config/assets.php b/config/assets.php index faddde51..0edb1280 100644 --- a/config/assets.php +++ b/config/assets.php @@ -36,6 +36,6 @@ 'url' => get_theme_file_uri('public'), 'assets' => get_theme_file_path('public/manifest.json'), 'bundles' => get_theme_file_path('public/entrypoints.json'), - ] - ] + ], + ], ]; diff --git a/src/Roots/Acorn/Assets/AssetsServiceProvider.php b/src/Roots/Acorn/Assets/AssetsServiceProvider.php index eebcb26f..c7ef6b22 100644 --- a/src/Roots/Acorn/Assets/AssetsServiceProvider.php +++ b/src/Roots/Acorn/Assets/AssetsServiceProvider.php @@ -18,6 +18,8 @@ public function register() return new Manager($this->app->make('config')->get('assets')); }); + $this->app->singleton('assets.vite', Vite::class); + $this->app->singleton('assets.manifest', function ($app) { return $app['assets']->manifest($this->getDefaultManifest()); }); diff --git a/src/Roots/Acorn/Assets/Vite.php b/src/Roots/Acorn/Assets/Vite.php new file mode 100644 index 00000000..c39175b7 --- /dev/null +++ b/src/Roots/Acorn/Assets/Vite.php @@ -0,0 +1,20 @@ +uri(); + } +}