arnoson / kirby-vite

Use Kirby CMS together with Vite
MIT License
81 stars 7 forks source link

fix: load css for an entry's imports #41

Closed arnoson closed 9 months ago

arnoson commented 9 months ago

Right now, if a js chunk that is imported by an entry has a corresponding css file it is not loaded. See: https://github.com/arnoson/kirby-vite-multi-page-kit/issues/16

vite()->js() should check the imports and add all css files.

Similar to this: right now in vite()->css() we only check for the first css entry. This hasn't caused an issue yet, but would be a good idea to include the whole css list.