mirror of
https://github.com/amir20/dozzle.git
synced 2026-01-01 18:47:25 +01:00
* WIP vue3 * WIP vue3 * WIP vue3 * Migrates to vitejs * Fixes js tests and removes not needed modules * Fixes unmount * Updates to use css instead for space * Fixes tests and rebases one more time * Uses orgua * Fixes migrations bugs with oruga and fixes scroll * Fixes v-deep * Fixes icons to prod * Fixes icons to prod * Adds favicon back * Transitions some to composition api * Updates another component to comp api * Cleans defineProps * Updates log messages * Moves more to compose api * Cleans up styles and rewrites event source * Tries to fix DOMPurify * Removes postcss * WIP typescript * Improves importing * Converts all to ts * Converts main to ts * Makes changes for tsconfig * Moves more to ts * Adds typing to store * More typing * Updates to ts * Updates the rest to ts * Fixes computes * Fixes unmount * Adds cypress with custom base fixed * Fixes jest tests * Fixes golang tests * Adds gitignore for cypress * Removes int in favor of e2e with cypress * Tries to fix int tests again * Adds title * Updates e2e tests * Uses vue for isMobile * Removes app spec * Cleans up docker * Adds drop down for settings * Fixes bug with restart * Fixes scroll up bug * Adds tests for light mode
49 lines
1.0 KiB
TypeScript
49 lines
1.0 KiB
TypeScript
import path from "path";
|
|
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import Icons from "unplugin-icons/vite";
|
|
import Components from "unplugin-vue-components/vite";
|
|
import IconsResolver from "unplugin-icons/resolver";
|
|
|
|
export default defineConfig(({ mode }) => ({
|
|
resolve: {
|
|
alias: {
|
|
"@/": `${path.resolve(__dirname, "assets")}/`,
|
|
},
|
|
},
|
|
base: mode === "production" ? "/<__BASE__>/" : "/",
|
|
plugins: [
|
|
vue(),
|
|
Icons({
|
|
autoInstall: true,
|
|
}),
|
|
Components({
|
|
dirs: ["assets/components"],
|
|
resolvers: [
|
|
IconsResolver({
|
|
componentPrefix: "",
|
|
}),
|
|
],
|
|
|
|
dts: "assets/components.d.ts",
|
|
}),
|
|
htmlPlugin(mode),
|
|
],
|
|
server: {
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:8080/",
|
|
},
|
|
},
|
|
},
|
|
}));
|
|
|
|
const htmlPlugin = (mode) => {
|
|
return {
|
|
name: "html-transform",
|
|
transformIndexHtml(html) {
|
|
return mode === "production" ? html.replaceAll("/<__BASE__>", "{{ .Base }}") : html;
|
|
},
|
|
};
|
|
};
|