mirror of
https://github.com/atdunbg/Nekosonic-Music.git
synced 2026-06-21 16:48:48 +08:00
- 移除PlayerBar顶部border线,进度条紧贴边缘无需分隔线 - 减少推荐按钮改为absolute定位,不参与播放控制按钮居中计算 - 删除未使用的npm依赖(howler/axios/@vueuse/motion/@vicons/ionicons5) - @iconify-json/lucide移至devDependencies - Cargo.toml添加[profile.release]优化(strip/lto/codegen-units/panic/opt-level) - crate-type精简,移除不需要的staticlib - Vite构建优化(esnext目标/CSS合并/vendor chunk拆分)
50 lines
957 B
TypeScript
50 lines
957 B
TypeScript
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";
|
|
|
|
const host = process.env.TAURI_DEV_HOST;
|
|
|
|
export default defineConfig(async () => ({
|
|
plugins: [
|
|
vue(),
|
|
tailwindcss(),
|
|
Icons({ compiler: "vue3" }),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
|
|
build: {
|
|
target: "esnext",
|
|
cssCodeSplit: false,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vendor: ["vue", "vue-router", "pinia"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
clearScreen: false,
|
|
server: {
|
|
port: 1420,
|
|
strictPort: true,
|
|
host: host || false,
|
|
hmr: host
|
|
? {
|
|
protocol: "ws",
|
|
host,
|
|
port: 1421,
|
|
}
|
|
: undefined,
|
|
watch: {
|
|
ignored: ["**/src-tauri/**"],
|
|
},
|
|
},
|
|
}));
|