support loading css first

#1032

Issue

Open
D
dominikg
Nov 25, 2024, 10:09 AM

Describe the problem

Currently css is cached and returned as a virtual module when .svelte files are imported as js module. But with vite ?direct or ?inline query urls, it is possible that the first request is not for the js module but the css.

Describe the proposed solution

In case the cache is empty when css is requested, compile.

Alternatives considered

keep current behavior, styles might not be needed before the js module

Importance

nice to have

Info

Assignees None
Labels enhancement
Milestone None