Skip to content

Commit f830b5e

Browse files
committed
chore: no buffers
1 parent 8a55bd7 commit f830b5e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/generators/legacy-html-all/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default {
8989
);
9090

9191
// We minify the html result to reduce the file size and keep it "clean"
92-
const minified = await minify(Buffer.from(result));
92+
const minified = await minify(result);
9393

9494
if (output) {
9595
await writeFile(join(output, 'all.html'), minified);

src/generators/legacy-html/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export default {
159159
for (const template of chunkResult) {
160160
const result = replaceTemplateValues(apiTemplate, template, releases);
161161

162-
const minified = await minify(Buffer.from(result));
162+
const minified = await minify(result);
163163

164164
await writeFile(join(output, `${template.api}.html`), minified);
165165
}

src/generators/web/utils/processing.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export async function processJSXEntries(
121121
.replace('{{speculationRules}}', SPECULATION_RULES);
122122

123123
// Minify HTML (input must be a Buffer)
124-
const finalHTMLBuffer = minifySync(Buffer.from(renderedHtml));
124+
const finalHTMLBuffer = minifySync(renderedHtml);
125125

126126
return { html: finalHTMLBuffer, api };
127127
});

0 commit comments

Comments
 (0)