Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Component styles missing on error pages #303

Closed
maxmilton opened this issue Jun 30, 2018 · 4 comments
Closed

Component styles missing on error pages #303

maxmilton opened this issue Jun 30, 2018 · 4 comments

Comments

@maxmilton
Copy link

Since Sapper v0.14.0 component styles are missing on error pages. I assume it's related to #300.

@Rich-Harris
Copy link
Member

I'm not seeing this... can you elaborate?

@maxmilton
Copy link
Author

This happens when there are styles in App.html or a component used in App.html. Normally a style block is added to the head when the route is loaded... but this doesn't happen on error pages.

I'm going to wait until #308 drops since it may inadvertently fix this. If it's still an issue afterwards then I'll create a minimal repro.

@Rich-Harris
Copy link
Member

0.15 is out — if you get a chance to see if it's fixed now, let me know! thanks

@maxmilton
Copy link
Author

After a bit of debugging, I figured it out! I'm using sapper-template and in my server.config.js I had a Svelte style preprocessor which returned nothing.

It didn't occur to me that the SSR styles were used to generate <style> blocks in the head. Once I set up style preprocessing the same as client.config.js then things are now working as expected.

Sorry for any confusion!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants