diff --git a/dashboard.js b/dashboard.js index 5c70946..2e2227e 100644 --- a/dashboard.js +++ b/dashboard.js @@ -5,7 +5,7 @@ const { svelte } = require('@sveltejs/vite-plugin-svelte'); const fs = require('fs').promises; const build = (prefix = '') => viteBuild({ - root: __dirname + '/gui/dashboard', + root: __dirname + '/gui/dashboard/', base: `${prefix}/statusdashboard/asset/`, plugins: [ svelte() ], build: { @@ -20,7 +20,10 @@ const build = (prefix = '') => viteBuild({ }, }); -const cleanup = () => fs.rmdir(__dirname + '/gui/dashboard/build'); +const cleanup = () => fs.rm(__dirname + '/gui/dashboard/build', { + recursive: true, + force: true, +}); module.exports = { build, cleanup }; build();