Skip to content

Commit c88398f

Browse files
author
arnoson
committed
fix: register plugin correctly
closes #54
1 parent 4e0c2f1 commit c88398f

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
require dirname(__DIR__, 4) . '/packages/kirby-vite/index.php';
3+
require dirname(__DIR__, 4) . '/index.php';

index.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
<?php
1+
<?php declare(strict_types=1);
22

3-
require __DIR__ . '/packages/kirby-vite/index.php';
3+
use arnoson\KirbyVite\Vite;
4+
5+
require_once __DIR__ . '/packages/kirby-vite/Vite.php';
6+
7+
Kirby\Cms\App::plugin('arnoson/kirby-vite', []);
8+
9+
function vite() {
10+
return Vite::getInstance();
11+
}

packages/kirby-vite/index.php

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)