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

@beamwind/ssr doesn't exist -> readme SSR example is broken #3

Closed
bebraw opened this issue Dec 15, 2020 · 3 comments
Closed

@beamwind/ssr doesn't exist -> readme SSR example is broken #3

bebraw opened this issue Dec 15, 2020 · 3 comments

Comments

@bebraw
Copy link
Contributor

bebraw commented Dec 15, 2020

Based on the readme, you should use import { getStyleTag } from '@beamwind/ssr' to implement SSR.

The package doesn't seem to exist, though, and that's the only reference to getStyleTag within the repository if I understand correctly.

@sastan
Copy link
Member

sastan commented Dec 15, 2020

You are right. @beamwind/ssr does not exist at the moment. Below is a outline how it should/will be implemented:

function getStyleTag(injector) {
  return `<style id="__beamwind">${injector.target.join('\n')}</style>`
}

The idea is that @beamwind/ssr would optimize the styles instead of simply joining them (see 455ccf1).

I hope that helps. Let me know if you need more details.

@bebraw
Copy link
Contributor Author

bebraw commented Dec 15, 2020

@sastan Awesome, thanks. That makes sense. I'll go along this way then. Feel free to close this issue once you have the helper in the package. 👍

@bebraw
Copy link
Contributor Author

bebraw commented Dec 16, 2020

I see you fixed this in f400cb3 so let's close.

@bebraw bebraw closed this as completed Dec 16, 2020
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