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 27f455c commit a790c0aCopy full SHA for a790c0a
vite-config/markdownPlugin.js
@@ -31,7 +31,7 @@ async function processCssFile(src, dest) {
31
}
32
33
34
-const createMarkdownPlugin = () => {
+const createMarkdownPlugin = (force = false) => {
35
return {
36
name: "markdown-plugin",
37
async buildStart() {
@@ -84,6 +84,12 @@ const createMarkdownPlugin = () => {
84
const { src, dest, type } = operation;
85
const destDir = dirname(dest);
86
87
+ if (!force && existsSync(dest)) {
88
+ console.log(`ℹ Skipping existing file: ${dest}`);
89
+
90
+ continue;
91
+ }
92
93
// Ensure destination directory exists
94
if (!existsSync(destDir)) {
95
mkdirSync(destDir, { recursive: true });
0 commit comments