Skip to content

Commit 96afb5c

Browse files
author
arnoson
committed
feat: load css entries in dev
1 parent c86a0c2 commit 96afb5c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/kirby-vite/Vite.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ public function css(
201201
true
202202
);
203203

204+
// If we are in dev mode and this is not a style, e.g.:
205+
// `vite()->css('index.js')`, the corresponding js entry will inject the
206+
// css and we don't have to do anything.
207+
if ($this->isDev()) {
208+
return $entryIsStyle ? css($this->assetDev($entry)) : null;
209+
}
210+
204211
$file = null;
205212
if ($entryIsStyle) {
206213
$file = $this->manifestProperty($entry, 'file', $try);

0 commit comments

Comments
 (0)