chore(vite): add asset cleanup before build to prevent accumulation of old files
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import vuetify from "vite-plugin-vuetify";
|
||||
|
||||
// Purge old assets before build to prevent accumulation
|
||||
const assetsDir = path.join(__dirname, "meshchatx", "public", "assets");
|
||||
if (fs.existsSync(assetsDir)) {
|
||||
fs.rmSync(assetsDir, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
export default {
|
||||
plugins: [vue(), vuetify()],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user