Skip to content

DOCS: PRSSI (Path-relative style sheet import) fix when using sveltekit #13693

@jjones315

Description

@jjones315

Describe the bug

This is likely more of a docs issue than a bug, but i dont see a issue template for docs, and i feel bug is closer than feature request, sorry if this is wrong.

Had our website flagged for PRSSI by a security scan and slightly stumped on the optimal way to fix it.

Adding a base element to our site will break several things since right now paths are relative to the current page, and also i don't see a clear way to add a env specific base element in to the top of the html, using svelte:head places it after the style imports by default.

reading the docs i see mentions of assets and base in the docs but base is for relative paths and assets doesn't seem to affect style sheets.

files in /public and js files are using the absolute path correctly. but for some reason styles are not working the same

i tried adjusting the roll up options in vite, but the asset outputs are overwritten by the svelte config.

Image

Reproduction

N/A

Logs

System Info

N/A

Severity

blocking all usage of SvelteKit

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions