entry-server.tsx 844 B

123456789101112131415161718192021222324252627282930
  1. // @refresh reload
  2. import { createHandler, StartServer } from "@solidjs/start/server"
  3. const criticalCSS = `[data-component="top"]{min-height:80px;display:flex;align-items:center}`
  4. export default createHandler(
  5. () => (
  6. <StartServer
  7. document={({ assets, children, scripts }) => (
  8. <html lang="en">
  9. <head>
  10. <meta charset="utf-8" />
  11. <meta name="viewport" content="width=device-width, initial-scale=1" />
  12. <meta property="og:image" content="/social-share.png" />
  13. <meta property="twitter:image" content="/social-share.png" />
  14. <style>{criticalCSS}</style>
  15. {assets}
  16. </head>
  17. <body>
  18. <div id="app">{children}</div>
  19. {scripts}
  20. </body>
  21. </html>
  22. )}
  23. />
  24. ),
  25. {
  26. mode: "async",
  27. },
  28. )