Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

🎨 Remove comments and preserve scripts #84

Merged

Conversation

luisherranz
Copy link
Member

I don't remember why we removed the script's children in the first place. We should investigate that, so let's preserve them again and see when they fail.

I've also added logic to remove the comments because Preact doesn't support them during the hydration. We may need to add them back after the hydration if sites rely on them, but for now, I'd keep them removed.

Copy link
Contributor

@SantosGuillamot SantosGuillamot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🙂 Although I'm not 100% sure how to test it.

@luisherranz
Copy link
Member Author

We'll keep testing it, don't worry 🙂

@luisherranz luisherranz merged commit b2ee075 into main-wp-directives-plugin Oct 18, 2022
@luisherranz luisherranz deleted the preserve-scripts-and-remove-comments branch October 18, 2022 12:53
@luisherranz luisherranz changed the title Remove comments and preserve scripts 🎨 Remove comments and preserve scripts Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preact: Hydration fails when there are HTML comments
2 participants