You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When processing HTML the rollup-plugin-html plugin skips extracting assets within <template> tags.
I've made myself a small build system that uses @lit-labs/ssr to generate HTML pages and noticed that the image assets of a components were not being extracted. I've generated this minimal page as an example. The /public/img/me.png asset is not being extracted or included in the build.
Hypothesis:
parse5 treats the contents of a <template> as a documentFragment and it only exists as content and does not exist in childNodes and when parse5-utils traverses childNodes it does not find the contents of a template.
parse5-utils using getChildNodes to traverse the document for assets.
When processing HTML the
rollup-plugin-html
plugin skips extracting assets within<template>
tags.I've made myself a small build system that uses
@lit-labs/ssr
to generate HTML pages and noticed that the image assets of a components were not being extracted. I've generated this minimal page as an example. The/public/img/me.png
asset is not being extracted or included in the build.I've also reproduced using a css asset.
Hypothesis:
parse5 treats the contents of a
<template>
as adocumentFragment
and it only exists ascontent
and does not exist inchildNodes
and when parse5-utils traverseschildNodes
it does not find the contents of a template.parse5-utils
usinggetChildNodes
to traverse the document for assets.web/packages/parse5-utils/src/index.js
Line 218 in d6a6112
The text was updated successfully, but these errors were encountered: