Skip to content

support loading css first #1032

Open
Open
@dominikg

Description

@dominikg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions