1 Star 5 Fork 0

Light_Quanta/BiliResourceDownloader

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 2.16 KB
一键复制 编辑 原始数据 按行查看 历史
Light_Quanta 提交于 2024-10-21 05:26 . feat: 添加eslint并修正代码
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { VueRouterAutoImports } from 'unplugin-vue-router'
import VueRouter from 'unplugin-vue-router/vite'
import Components from 'unplugin-vue-components/vite';
import AutoImport from 'unplugin-auto-import/vite';
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver'
import vueDevTools from 'vite-plugin-vue-devtools'
// @ts-expect-error process is a nodejs global
const host = process.env.TAURI_DEV_HOST;
// https://vitejs.dev/config/
export default defineConfig(async () => ({
plugins: [
VueRouter(),
AutoImport({
imports: [
'vue',
'@vueuse/core',
VueRouterAutoImports,
{
'@tauri-apps/plugin-http': ['fetch']
}
],
resolvers: [
ElementPlusResolver(),
IconsResolver({
prefix: 'Icon'
}),
],
vueTemplate: true,
}),
vue(),
Components({
dts: true,
dirs: ["src/components"],
exclude: ["src/pages"],
resolvers: [
ElementPlusResolver(),
IconsResolver({
enabledCollections: ['ep'],
})
],
}),
Icons({
autoInstall: true,
}),
vueDevTools(),
],
// 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/**"],
},
},
}));
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Light_Quanta/BiliResourceDownloader.git
git@gitee.com:Light_Quanta/BiliResourceDownloader.git
Light_Quanta
BiliResourceDownloader
BiliResourceDownloader
main

搜索帮助