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

fix(parse5-utils): add support for templates #2398

Merged

Conversation

WillsonSmith
Copy link
Contributor

@WillsonSmith WillsonSmith commented Jul 22, 2023

Proposed fix for #2397

parse5-utils does not currently handle tags within a <template> tag, this prevents rollup-plugin-html from extracting assets that are within a template.

What I did

  1. Add a condition to findNodes that will get child nodes of a <template> tag
  2. Add a test to ensure the change functions as expected

🤔 I suppose this might be a major version bump.

@changeset-bot
Copy link

changeset-bot bot commented Jul 22, 2023

🦋 Changeset detected

Latest commit: d5da0e4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web/parse5-utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@koddsson
Copy link
Contributor

koddsson commented Aug 4, 2023

@43081j; You've been doing parse5 stuff lately? What do you think?

@43081j
Copy link
Contributor

43081j commented Aug 4, 2023

Makes sense to me!

I've been building an official parse5 tools package but we can't move mw over yet since it doesn't build esm.

Once we can use that, you would still do this same code though. But there's a type guard to check if a node is a template

@koddsson koddsson merged commit 7bd56e1 into modernweb-dev:master Aug 4, 2023
5 checks passed
@WillsonSmith WillsonSmith deleted the parse5-utils-support-templates branch August 18, 2023 16:49
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.

3 participants