We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6601fe0 commit 9113580Copy full SHA for 9113580
html.js
@@ -1,6 +1,4 @@
1
-import { readFile, mkdir, writeFile } from 'fs/promises';
2
-import { dirname } from 'path';
3
-import { constants } from 'fs';
+import { readFile, writeFile } from 'fs/promises';
4
5
export default function html(options = {}) {
6
return {
@@ -22,13 +20,6 @@ export default function html(options = {}) {
22
20
.replace('</body>', () => `<script>\n${js.text}</script>\n</body>`);
23
21
}
24
25
- const dirpath = dirname(options.out);
26
- try {
27
- await access(dirpath, constants.R_OK | constants.W_OK);
28
- } catch {
29
- mkdir(dirpath);
30
- }
31
-
32
await writeFile(options.out, html, { encoding: 'utf8' });
33
});
34
},
0 commit comments