Skip to content

Commit 34f0373

Browse files
committed
chore: get out of here
1 parent 0c42c97 commit 34f0373

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/generators/web/index.mjs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { readFile } from 'node:fs/promises';
1+
import { readFile, writeFile } from 'node:fs/promises';
22
import { createRequire } from 'node:module';
33
import { join } from 'node:path';
44

55
import createASTBuilder from './utils/generate.mjs';
66
import { processJSXEntries } from './utils/processing.mjs';
7-
import { safeWrite } from '../../utils/safeWrite.mjs';
87

98
/**
109
* Web generator - transforms JSX AST entries into complete web bundles.
@@ -57,16 +56,16 @@ export default {
5756
if (output) {
5857
// Write HTML files
5958
for (const { html, api } of results) {
60-
await safeWrite(join(output, `${api}.html`), html, 'utf-8');
59+
await writeFile(join(output, `${api}.html`), html, 'utf-8');
6160
}
6261

6362
// Write code-split JavaScript chunks
6463
for (const chunk of jsChunks) {
65-
await safeWrite(join(output, chunk.fileName), chunk.code, 'utf-8');
64+
await writeFile(join(output, chunk.fileName), chunk.code, 'utf-8');
6665
}
6766

6867
// Write CSS bundle
69-
await safeWrite(join(output, 'styles.css'), css, 'utf-8');
68+
await writeFile(join(output, 'styles.css'), css, 'utf-8');
7069
}
7170

7271
// Return HTML and CSS for each entry

0 commit comments

Comments
 (0)