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());