fix: tailwind build not creating subfolders (#2145)

This commit is contained in:
Marvin Hagemeister
2023-12-06 08:57:31 +01:00
committed by GitHub
parent 7465dbd978
commit c05a6b1496
11 changed files with 109 additions and 0 deletions
+9
View File
@@ -106,6 +106,15 @@ export default function tailwind(): Plugin {
const relFilePath = path.relative(staticDir, file.path);
const outPath = path.join(outDir, relFilePath);
try {
await Deno.mkdir(path.dirname(outPath), { recursive: true });
} catch (err) {
if (!(err instanceof Deno.errors.AlreadyExists)) {
throw err;
}
}
await Deno.writeTextFile(outPath, result.content);
}
},