diff --git a/package-lock.json b/package-lock.json index 601b0c5..48d0018 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nekosonic", - "version": "0.1.0", + "version": "0.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nekosonic", - "version": "0.1.0", + "version": "0.3.0", "dependencies": { "@tauri-apps/api": "^2", "@tauri-apps/plugin-dialog": "^2.7.1", @@ -27,7 +27,7 @@ "@types/node": "^25.6.0", "@types/qrcode": "^1.5.6", "@vicons/ionicons5": "^0.13.0", - "@vitejs/plugin-vue": "^5.2.1", + "@vitejs/plugin-vue": "^5.2.4", "@vueuse/motion": "^3.0.3", "tailwindcss": "^4.2.4", "typescript": "~5.6.2", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 08884c9..22c1c40 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -40,13 +40,5 @@ "type": "downloadBootstrapper" } } - }, - "plugins": { - "updater": { - "endpoints": [ - "https://github.com/atdunbg/Nekosonic-Music/releases/latest/download/latest.json" - ], - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDM1MDdCMTJCRTE3MUI4N0QKUldSOXVISGhLN0VITmM3ZkJlbjF3UGJrK3h6ellWZ2xSUG03b3d1RWlDeldSWk1nc0pic2J2MVkK" - } } -} \ No newline at end of file +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..6d6ba4f --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,45 @@ +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; +import tailwindcss from "@tailwindcss/vite"; +import Icons from "unplugin-icons/vite"; +import { fileURLToPath, URL } from "node:url"; + + +// \@ts-expect-error process is a nodejs global +const host = process.env.TAURI_DEV_HOST; + +// https://vite.dev/config/ +export default defineConfig(async () => ({ + plugins: [ + vue(), + tailwindcss(), + Icons({ compiler: "vue3" }), + ], + resolve: { + alias: { + "@": fileURLToPath(new URL("./src", import.meta.url)), + }, + }, + + // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` + // + // 1. prevent Vite from obscuring rust errors + clearScreen: false, + // 2. tauri expects a fixed port, fail if that port is not available + server: { + port: 1420, + strictPort: true, + host: host || false, + hmr: host + ? { + protocol: "ws", + host, + port: 1421, + } + : undefined, + watch: { + // 3. tell Vite to ignore watching `src-tauri` + ignored: ["**/src-tauri/**"], + }, + }, +}));