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

feat(ssr): implement SSR feature #3354

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

hrynevychroman
Copy link

@hrynevychroman hrynevychroman commented Jan 10, 2025

Feature

Add SSR logic; will be working plug and play with Nuxt.

First, I changed dompurify dep to isomorphic-dompurify as it can be used on the server without additional work. So firstly, migrate to a new package, then remove the previous one. Added getSSRProps; one point difference is that on the server, we need to use directly imported isomorphic-dompurify package because buildDOMPurifyInstance() is not defined. I think this is not a problem at all, I tested on my live project, and everything seems to work fine 🙌

Video example

vue-dompurify-html-ssr.mp4

Changelog

🚀 Enhancements

  • vue-dompurify-html: Migrate from dompurify to isomorphic-dompurify (2ebb0f9)
  • vue-dompurify-html: Add SSR support (2f29d65)

📖 Documentation

  • nuxt3: Add SSR examples with default and plaintext directives (0066191)

🏡 Chore

  • vue-dompurify-html: Add isomorphic-dompurify dep (386f19e)
  • vue-dompurify-html: Remove dompurify dependency (92e0727)

Fix #1917

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

Successfully merging this pull request may close these issues.

Contents not rendered at server-side with nuxt.
1 participant