3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-06 02:27:19 +00:00

refactor: build dashboard with vite

This commit is contained in:
Dragory 2025-06-01 14:43:40 +00:00
parent f5806932af
commit aaac328138
No known key found for this signature in database
45 changed files with 1284 additions and 9668 deletions

40
dashboard/vite.config.ts Normal file
View file

@ -0,0 +1,40 @@
import { defineConfig, Plugin } from "vite";
import vue from "@vitejs/plugin-vue";
import tailwind from "@tailwindcss/vite";
function htmlImport(): Plugin {
return {
name: "html-import",
transform(code, id) {
if (id.endsWith(".html")) {
return {
code: `export default ${JSON.stringify(code)};`,
map: null,
};
}
return null;
},
};
}
export default defineConfig((configEnv) => {
return {
server: {
port: 3002,
host: "0.0.0.0",
allowedHosts: true,
},
plugins: [
vue({
template: {
compilerOptions: {
// Needed to prevent hardcoded code blocks from breaking in docs
whitespace: "preserve",
},
},
}),
tailwind(),
htmlImport(),
],
};
});