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
{{ message }}
Repository navigation
Commit 88c7714
Browse filesBrowse the repository at this point in the historyBrowse files
fix(css): spell a rebuilt data url so it parses back, and report a redo throw
Two findings from review, both real.
A rebuilt `data:` url was spliced into the output unescaped, so a renderer
returning a payload with a space or a quote — an SVG minifier's ordinary output
— ended the url token or its string early and a browser dropped the whole
declaration. One place now decides how a rebuilt url is spelled: a url token
where it can be one, quoted with the delimiter escaped where it cannot. A body
still carrying a CSS escape is declined rather than read with its backslashes
in it, which is what keeps the rewrite idempotent.
And the second code-generation pass called `codeGeneration()` with no
try/catch, where the first pass wraps it: a generator throwing there escaped
through the async chain instead of being reported as a `CodeGenerationError`,
so a build could die with nothing to show for it.
Also shortens the changeset and the comments the guidelines cap at two lines,
and hashes every renderer option the sample plugin varies on rather than
`minimizerOptions` alone.
Copy file name to clipboardExpand all lines: .changeset/073-minify-embedded-css-html.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
"webpack": minor
3
3
---
4
4
5
-
Add `renderEmbeddedSource` to transform source one language embeds in another: a compilation hook for CSS and HTML in JavaScript, and a serializer option for an inline `<style>`, `<script>`, every `style=""` (SVG's included), an `<svg>` subtree, an `<iframe srcdoc>` document, and a `url()``data:` payload.
5
+
Add `renderEmbeddedSource` to transform source one language embeds in another.
0 commit comments