From 16801c7bedb2f0f002a5f80eaf49460854cd1450 Mon Sep 17 00:00:00 2001 From: Neil Sorensen Date: Tue, 29 Oct 2024 10:36:23 -0600 Subject: [PATCH] chore(rollup config): update markdown parser plugin to create build dir if it does not exist (#123) - Fix build on Windows --- rollup.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rollup.config.js b/rollup.config.js index ab44cda2..541c1065 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -77,6 +77,10 @@ function markdownParser(config) { // Construct the destination path const dest = path.join(srcPath, config.targets[index].dest, `${fileName}.html`); + const destDir = path.join(srcPath, config.targets[index].dest); + if(!fs.existsSync(destDir)){ + fs.mkdirSync(destDir); + } // Write the parsed markdown to the destination path fs.writeFileSync(dest, `
${markdown}
`);