From 056ba6d410e461cf5a56af36c62c7f95ceeaef19 Mon Sep 17 00:00:00 2001 From: leafee98 Date: Fri, 14 Jul 2023 20:58:02 +0800 Subject: [PATCH] fix: failed to create dir when ./dist not exist --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f6e85f5..bcf95fe 100644 --- a/index.js +++ b/index.js @@ -80,7 +80,7 @@ function serve(config, nunjucks_env) { function generate(config, nunjucks_env) { const rendered = nunjucks_env.render(template_path, config); if (! fs.existsSync(path.dirname(output_path))) { - fs.mkdirSync(fs.dirname(output_path), { recursive: true }); + fs.mkdirSync(path.dirname(output_path), { recursive: true }); } fs.writeFileSync(output_path, rendered); }