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

Preact & Vite Server Side rendering throws error #1397

Open
functionalDev opened this issue Mar 12, 2024 · 0 comments
Open

Preact & Vite Server Side rendering throws error #1397

functionalDev opened this issue Mar 12, 2024 · 0 comments
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided platform: ssr 🛠️ Issue related to SSR

Comments

@functionalDev
Copy link

functionalDev commented Mar 12, 2024

Environment

  • Linaria version: 6.1.0
  • @wyw-in-js/vite: 0.5.0,
  • preact: 10.19.3,
  • preact-render-to-string: 6.3.1
  • Vite: 5.1.3
  • Node.js version: 20.3
  • express: 4.18.2
  • OS: Windows 10

Description

When server side rendering linaria component with renderToString from "preact-render-to-string" an error is thrown

Error: [object Object] is not a valid HTML tag name in <[object Object]>
at T (file:///C:/ROAD/webapp/node_modules/preact-render-to-string/dist/index.mjs:1:7405)

Reproducible Demo

A minimal demo with an express server:
https://codesandbox.io/p/devbox/linaria-preact-vite-6g9frp

When running npm run start or the "start SSR"-task you will see the error thrown in the terminal/console.

@functionalDev functionalDev added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Mar 12, 2024
@github-actions github-actions bot added platform: ssr 🛠️ Issue related to SSR and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided platform: ssr 🛠️ Issue related to SSR
Projects
None yet
Development

No branches or pull requests

1 participant