-
-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Describe the bug
When using @quasar/quasar-ui-qmarkdown
in an SSR + SPA Quasar project, hydration fails because the component renders nothing on the server, but a <div>
on the client. This results in Vue’s hydration mismatch warning:
[Vue warn]: Hydration node mismatch:
- rendered on server:
- expected on client: div
at <QMarkdown src="# hello world" >
This effectively means the markdown is not being rendered at SSR time.
To Reproduce
Steps to reproduce the behavior:
-
Create a new Quasar project in SSR mode (
quasar create ... --mode ssr
) -
Install extension:
quasar ext add @quasar/qmarkdown
-
Use
QMarkdown
inside a page/component: -
Run in SSR mode (
quasar dev -m ssr
) -
Open the page and check browser console → hydration warning.
-
Check raw server-rendered HTML (
view-source:
) → theq-markdown
output is missing.
Expected behavior
The markdown should be parsed and rendered to HTML on the server, so that server-rendered HTML and client-rendered HTML match. No hydration errors should occur.
Screenshots
N/A
Desktop (please complete the following information)
- OS: macOS 15.6.1
- Browser: Chromium: 138.0.7204.157
- Quasar: 2.16.0
- Quasar/cli: 2.5.0
- @quasar/quasar-ui-qmarkdown: 2.0.5 (installed via
quasar ext add @quasar/qmarkdown
)
Smartphone (please complete the following information)
(not tested, SSR hydration issue is reproducible on desktop)
Additional context
- When hardcoding
<q-markdown src="# hello world" />
, the issue still occurs, so it’s not related to dynamic content.