GoogleChromeLabs / critters

🦔 A Webpack plugin to inline your critical CSS and lazy-load the rest.
https://npm.im/critters-webpack-plugin
Apache License 2.0
3.42k stars 108 forks source link

critters de-encodes html entities #132

Open danielroe opened 1 year ago

danielroe commented 1 year ago

Context

https://github.com/nuxt/assets/commit/03416341f7664f232da121deebb2fb53ab3dd864 https://github.com/nuxt/nuxt/issues/22383

Bug

HTML entities are decoded in the process:

<div>
  &lt;NuxtWelcome /&gt;
</div>

gets transformed to:

<div>
  <NuxtWelcome />
</div>

Reproduction

https://stackblitz.com/edit/stackblitz-starters-3vqjhj?description=Starter%20project%20for%20Node.js,%20a%20JavaScript%20runtime%20built%20on%20Chrome's%20V8%20JavaScript%20engine&file=index.js,package.json&title=node.new%20Starter

danielroe commented 1 year ago

I think this was likely resolved in https://github.com/GoogleChromeLabs/critters/pull/133.