Skip to content

Dev SSR loader should track CSS dependencies #275

Closed
@Rich-Harris

Description

@Rich-Harris

At present, the dev server inlines 'critical' CSS which basically means this:

const rendered = options.root.render(props);

// ...
const styles = `<style>${rendered.css.code}</style>`

Leaving aside the lack of sourcemaps here, this doesn't totally work, because it only includes Svelte's own CSS. It doesn't include anything that was manually imported.

The dev loader just ignores CSS files altogether, but it could instead gather up those dependencies and report back

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions