This commit is contained in:
Oscar
2026-06-08 13:23:20 +03:00
commit 637dddf656
160 changed files with 56097 additions and 0 deletions

49
vite.config.ts Normal file
View File

@@ -0,0 +1,49 @@
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import tailwindcss from "@tailwindcss/vite";
import { resolve } from "path";
const host = process.env.TAURI_DEV_HOST;
export default defineConfig(async () => ({
plugins: [vue(), tailwindcss()],
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
css: {
preprocessorOptions: {
scss: {
// Inject variables/mixins into every Vue component's <style lang="scss">
additionalData: (source: string, filePath: string) => {
// Skip the variables file itself and the main style files to avoid circular deps
if (filePath.includes('_variables') || filePath.includes('styles/main') || filePath.includes('styles/tailwind')) {
return source;
}
return `@use "@/styles/_variables.scss" as *;\n${source}`;
},
},
},
},
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
clearScreen: false,
server: {
port: 1420,
strictPort: true,
host: host || false,
hmr: host
? {
protocol: "ws",
host,
port: 1421,
}
: undefined,
watch: {
ignored: ["**/src-tauri/**"],
},
},
}));