Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoped CSS and SSR #24

Closed
hworld opened this issue Mar 20, 2017 · 2 comments
Closed

Scoped CSS and SSR #24

hworld opened this issue Mar 20, 2017 · 2 comments

Comments

@hworld
Copy link

hworld commented Mar 20, 2017

I've been trying to set up server side rendering for my Vue project with scoped CSS. It seems to be failing on loading in the scoped styles through the loader included in the lib folder of the project. Something about super.apply can't be called?

However, the second issue that I see coming up is possible ID mismatches. I believe it generates IDs by just incrementing a global var and assigning it to the filename. If the server side rendered bundle differs in the number of components loaded in (or loads them in a different order) I believe it will change the IDs assigned to the component and the data attributes will no longer match the CSS from the browser CSS bundle.

What do you think about changing it to a hash of the filename for the component instead? I believe this would stay consistent across both server bundle and the client bundle.

@ktsn
Copy link
Owner

ktsn commented Mar 23, 2017

I'll use hash for component id from the next version.

@hworld
Copy link
Author

hworld commented Mar 31, 2017

Yayyy! Thanks a bunch

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

No branches or pull requests

2 participants