From 4b632219afe9d9a642be5642cdba9354162ec08c Mon Sep 17 00:00:00 2001 From: Lukas Kleinschmidt Date: Thu, 6 Jul 2023 16:14:22 +0200 Subject: [PATCH] Fixed regression --- README.md | 6 +++--- index.php | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 32a89f5..5a49038 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ If you need to include additional attributes on your script and style tags, such ```php return [ - 'lukaskleinschmidt.kirby-laravel-vite' => [ + 'lukaskleinschmidt.laravel-vite' => [ 'scriptTagAttributes' => [ 'data-turbo-track' => 'reload', // Specify a value for the attribute... 'async' => true, // Specify an attribute without a value... @@ -186,7 +186,7 @@ If you need to conditionally add attributes, you may pass a callback that will r ```php return [ - 'lukaskleinschmidt.kirby-laravel-vite' => [ + 'lukaskleinschmidt.laravel-vite' => [ 'scriptTagAttributes' => fn (string $src, string $url, array $chunk, array $manifest) => [ 'data-turbo-track' => $src === 'assets/js/app.js' ? 'reload' : false, ], @@ -207,7 +207,7 @@ To enable additional customization options, you can use the following options: ```php return [ - 'lukaskleinschmidt.kirby-laravel-vite' => [ + 'lukaskleinschmidt.laravel-vite' => [ 'hotFile' => fn () => kirby()->root('storage') . '/vite.hot', 'buildDirectory' => 'bundle', 'manifest' => 'assets.json', diff --git a/index.php b/index.php index 7985cf1..fbf77f4 100644 --- a/index.php +++ b/index.php @@ -23,8 +23,9 @@ 'hooks' => [ 'system.loadPlugins:after' => function () use ($options) { foreach ($options as $key => $defaultValue) { - $value = option('lukaskleinschmidt.kirby-laravel-vite.' . $key); - $method = 'use' . ucfirst($key); + $value = option('lukaskleinschmidt.kirby-laravel-vite.' . $key); + $value ??= option('lukaskleinschmidt.laravel-vite.' . $key); + $method = 'use' . ucfirst($key); if (is_null($defaultValue) && is_callable($value)) { $value = $value(kirby());