chore: 更新依赖

This commit is contained in:
Hooray 2024-09-21 03:55:45 +08:00
parent 026dfdbaef
commit ffd040a0ef
46 changed files with 1899 additions and 1697 deletions

View File

@ -23,17 +23,17 @@
"release": "bumpp"
},
"dependencies": {
"@headlessui/vue": "^1.7.22",
"@headlessui/vue": "^1.7.23",
"@imengyu/vue3-context-menu": "^1.4.2",
"@vueuse/components": "^11.0.3",
"@vueuse/core": "^11.0.3",
"@vueuse/integrations": "^11.0.3",
"@vueuse/components": "^11.1.0",
"@vueuse/core": "^11.1.0",
"@vueuse/integrations": "^11.1.0",
"axios": "^1.7.7",
"dayjs": "^1.11.13",
"defu": "^6.1.4",
"disable-devtool": "^0.3.7",
"element-plus": "^2.8.1",
"eruda": "^3.2.3",
"element-plus": "^2.8.3",
"eruda": "^3.3.0",
"floating-vue": "5.2.2",
"hotkeys-js": "^3.13.7",
"lodash-es": "^4.17.21",
@ -43,69 +43,69 @@
"overlayscrollbars": "^2.10.0",
"overlayscrollbars-vue": "^0.5.9",
"path-browserify": "^1.0.1",
"path-to-regexp": "^7.1.0",
"path-to-regexp": "^8.1.0",
"pinia": "^2.2.2",
"qs": "^6.13.0",
"scule": "^1.3.0",
"vconsole": "^3.15.1",
"vue": "^3.4.38",
"vue": "^3.5.7",
"vue-m-message": "^4.0.2",
"vue-router": "^4.4.3"
"vue-router": "^4.4.5"
},
"devDependencies": {
"@antfu/eslint-config": "2.24.1",
"@iconify/json": "^2.2.243",
"@antfu/eslint-config": "3.7.1",
"@iconify/json": "^2.2.251",
"@iconify/vue": "^4.1.2",
"@stylistic/stylelint-config": "^2.0.0",
"@types/lodash-es": "^4.17.12",
"@types/mockjs": "^1.0.10",
"@types/nprogress": "^0.2.3",
"@types/path-browserify": "^1.0.3",
"@types/qs": "^6.9.15",
"@unocss/eslint-plugin": "^0.62.3",
"@types/qs": "^6.9.16",
"@unocss/eslint-plugin": "^0.62.4",
"@vitejs/plugin-legacy": "^5.4.2",
"@vitejs/plugin-vue": "^5.1.3",
"@vitejs/plugin-vue": "^5.1.4",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"autoprefixer": "^10.4.20",
"boxen": "^8.0.1",
"bumpp": "^9.5.2",
"cz-git": "^1.9.4",
"eslint": "^9.9.1",
"eslint": "^9.11.0",
"esno": "^4.7.0",
"fs-extra": "^11.2.0",
"http-server": "^14.1.1",
"inquirer": "^10.1.8",
"lint-staged": "^15.2.9",
"npm-run-all2": "^6.2.2",
"picocolors": "^1.0.1",
"inquirer": "^11.0.2",
"lint-staged": "^15.2.10",
"npm-run-all2": "^6.2.3",
"picocolors": "^1.1.0",
"plop": "^4.0.1",
"postcss": "^8.4.42",
"postcss": "^8.4.47",
"postcss-nested": "^6.2.0",
"sass": "^1.77.8",
"sass": "^1.79.2",
"simple-git-hooks": "^2.11.1",
"stylelint": "^16.9.0",
"stylelint-config-recess-order": "^5.1.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-config-standard-vue": "^1.0.0",
"stylelint-scss": "^6.5.1",
"stylelint-scss": "^6.7.0",
"svgo": "^3.3.2",
"typescript": "^5.5.4",
"unocss": "^0.62.3",
"typescript": "^5.6.2",
"unocss": "^0.62.4",
"unocss-preset-scrollbar": "^0.3.1",
"unplugin-auto-import": "^0.18.2",
"unplugin-turbo-console": "^1.10.1",
"unplugin-auto-import": "^0.18.3",
"unplugin-turbo-console": "^1.10.2",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.4.2",
"vite": "^5.4.6",
"vite-plugin-app-loading": "^0.3.0",
"vite-plugin-archiver": "^0.1.1",
"vite-plugin-banner": "^0.7.1",
"vite-plugin-compression2": "^1.2.0",
"vite-plugin-fake-server": "^2.1.1",
"vite-plugin-banner": "^0.8.0",
"vite-plugin-compression2": "^1.3.0",
"vite-plugin-fake-server": "^2.1.2",
"vite-plugin-pages": "^0.32.3",
"vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-vue-devtools": "^7.3.9",
"vite-plugin-vue-devtools": "^7.4.5",
"vite-plugin-vue-meta-layouts": "^0.4.3",
"vue-tsc": "^2.1.4"
"vue-tsc": "^2.1.6"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged",

View File

@ -1,5 +1,5 @@
import path from 'node:path'
import fs from 'node:fs'
import path from 'node:path'
function getFolder(path) {
const components = []

View File

@ -1,5 +1,5 @@
import path from 'node:path'
import fs from 'node:fs'
import path from 'node:path'
function getFolder(path) {
const components = []

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
import { exec } from 'node:child_process'
import path from 'node:path'
import process from 'node:process'
import { exec } from 'node:child_process'
import { lookupCollection, lookupCollections } from '@iconify/json'
import fs from 'fs-extra'
import inquirer from 'inquirer'
import { lookupCollection, lookupCollections } from '@iconify/json'
async function generateIcons() {
// 拿到全部图标集的原始数据

View File

@ -1,8 +1,8 @@
<script setup lang="ts">
import hotkeys from 'hotkeys-js'
import eventBus from './utils/eventBus'
import Provider from './ui-provider/index.vue'
import useSettingsStore from '@/store/modules/settings'
import hotkeys from 'hotkeys-js'
import Provider from './ui-provider/index.vue'
import eventBus from './utils/eventBus'
const route = useRoute()

View File

@ -1,8 +1,8 @@
import axios from 'axios'
import useUserStore from '@/store/modules/user'
import axios from 'axios'
// import qs from 'qs'
import Message from 'vue-m-message'
import useUserStore from '@/store/modules/user'
const api = axios.create({
baseURL: (import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true') ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { UseImage } from '@vueuse/components'
import { Icon } from '@iconify/vue'
import { UseImage } from '@vueuse/components'
defineOptions({
name: 'SvgIcon',

View File

@ -1,10 +1,10 @@
<script setup lang="ts">
import settingsDefault from '@/settings.default'
import useMenuStore from '@/store/modules/menu'
import useSettingsStore from '@/store/modules/settings'
import eventBus from '@/utils/eventBus'
import { useClipboard } from '@vueuse/core'
import Message from 'vue-m-message'
import settingsDefault from '@/settings.default'
import eventBus from '@/utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import useMenuStore from '@/store/modules/menu'
defineOptions({
name: 'AppSetting',

View File

@ -1,8 +1,8 @@
<script setup lang="ts">
import Logo from '../Logo/index.vue'
import ToolbarRightSide from '../Topbar/Toolbar/rightSide.vue'
import useMenuStore from '@/store/modules/menu'
import useSettingsStore from '@/store/modules/settings'
import Logo from '../Logo/index.vue'
import ToolbarRightSide from '../Topbar/Toolbar/rightSide.vue'
defineOptions({
name: 'LayoutHeader',

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import eventBus from '@/utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import eventBus from '@/utils/eventBus'
defineOptions({
name: 'HotkeysIntro',

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import useSettingsStore from '@/store/modules/settings'
import imgLogo from '@/assets/images/logo.png'
import useSettingsStore from '@/store/modules/settings'
defineOptions({
name: 'Logo',

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import Logo from '../Logo/index.vue'
import useSettingsStore from '@/store/modules/settings'
import useMenuStore from '@/store/modules/menu'
import useSettingsStore from '@/store/modules/settings'
import Logo from '../Logo/index.vue'
defineOptions({
name: 'MainSidebar',

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import SubMenu from './sub.vue'
import Item from './item.vue'
import type { MenuInjection, MenuProps } from './types'
import Item from './item.vue'
import SubMenu from './sub.vue'
import { rootMenuInjectionKey } from './types'
defineOptions({

View File

@ -1,9 +1,9 @@
<script setup lang="ts">
import { useTimeoutFn } from '@vueuse/core'
import type { OverlayScrollbarsComponentRef } from 'overlayscrollbars-vue'
import type { SubMenuProps } from './types'
import { useTimeoutFn } from '@vueuse/core'
import { OverlayScrollbarsComponent } from 'overlayscrollbars-vue'
import Item from './item.vue'
import type { SubMenuProps } from './types'
import { rootMenuInjectionKey } from './types'
defineOptions({

View File

@ -1,16 +1,16 @@
<script setup lang="ts">
import { Dialog, DialogDescription, DialogPanel, TransitionChild, TransitionRoot } from '@headlessui/vue'
import type { Menu } from '@/types/global'
import type { OverlayScrollbarsComponentRef } from 'overlayscrollbars-vue'
import { OverlayScrollbarsComponent } from 'overlayscrollbars-vue'
import { cloneDeep } from 'lodash-es'
import hotkeys from 'hotkeys-js'
import Breadcrumb from '../Breadcrumb/index.vue'
import BreadcrumbItem from '../Breadcrumb/item.vue'
import useMenuStore from '@/store/modules/menu'
import useSettingsStore from '@/store/modules/settings'
import { resolveRoutePath } from '@/utils'
import eventBus from '@/utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import useMenuStore from '@/store/modules/menu'
import type { Menu } from '@/types/global'
import { Dialog, DialogDescription, DialogPanel, TransitionChild, TransitionRoot } from '@headlessui/vue'
import hotkeys from 'hotkeys-js'
import { cloneDeep } from 'lodash-es'
import { OverlayScrollbarsComponent } from 'overlayscrollbars-vue'
import Breadcrumb from '../Breadcrumb/index.vue'
import BreadcrumbItem from '../Breadcrumb/item.vue'
defineOptions({
name: 'Search',

View File

@ -1,9 +1,9 @@
<script setup lang="ts">
import useMenuStore from '@/store/modules/menu'
import useSettingsStore from '@/store/modules/settings'
import { useElementSize } from '@vueuse/core'
import Logo from '../Logo/index.vue'
import Menu from '../Menu/index.vue'
import useSettingsStore from '@/store/modules/settings'
import useMenuStore from '@/store/modules/menu'
defineOptions({
name: 'SubSidebar',

View File

@ -1,12 +1,12 @@
<script setup lang="ts">
import ContextMenu from '@imengyu/vue3-context-menu'
import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css'
import hotkeys from 'hotkeys-js'
import Message from 'vue-m-message'
import { useMagicKeys } from '@vueuse/core'
import type { Tabbar } from '#/global'
import useSettingsStore from '@/store/modules/settings'
import useTabbarStore from '@/store/modules/tabbar'
import type { Tabbar } from '#/global'
import ContextMenu from '@imengyu/vue3-context-menu'
import { useMagicKeys } from '@vueuse/core'
import hotkeys from 'hotkeys-js'
import Message from 'vue-m-message'
import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css'
defineOptions({
name: 'Tabbar',

View File

@ -1,8 +1,8 @@
<script setup lang="ts">
import useSettingsStore from '@/store/modules/settings'
import { compile } from 'path-to-regexp'
import Breadcrumb from '../../../Breadcrumb/index.vue'
import BreadcrumbItem from '../../../Breadcrumb/item.vue'
import useSettingsStore from '@/store/modules/settings'
const route = useRoute()

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { useFullscreen } from '@vueuse/core'
import useSettingsStore from '@/store/modules/settings'
import { useFullscreen } from '@vueuse/core'
defineOptions({
name: 'Fullscreen',

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import eventBus from '@/utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import eventBus from '@/utils/eventBus'
defineOptions({
name: 'ToolbarRightSide',

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import useSettingsStore from '@/store/modules/settings'
import LeftSide from './leftSide.vue'
import RightSide from './rightSide.vue'
import useSettingsStore from '@/store/modules/settings'
defineOptions({
name: 'Toolbar',

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import Breadcrumb from './Breadcrumb/index.vue'
import useSettingsStore from '@/store/modules/settings'
import Breadcrumb from './Breadcrumb/index.vue'
defineOptions({
name: 'ToolbarLeftSide',

View File

@ -1,11 +1,11 @@
<script setup lang="ts">
import NavSearch from './NavSearch/index.vue'
import Fullscreen from './Fullscreen/index.vue'
import PageReload from './PageReload/index.vue'
import ColorScheme from './ColorScheme/index.vue'
import eventBus from '@/utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import useUserStore from '@/store/modules/user'
import eventBus from '@/utils/eventBus'
import ColorScheme from './ColorScheme/index.vue'
import Fullscreen from './Fullscreen/index.vue'
import NavSearch from './NavSearch/index.vue'
import PageReload from './PageReload/index.vue'
defineOptions({
name: 'Tools',

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import useSettingsStore from '@/store/modules/settings'
import Tabbar from './Tabbar/index.vue'
import Toolbar from './Toolbar/index.vue'
import useSettingsStore from '@/store/modules/settings'
defineOptions({
name: 'Topbar',

View File

@ -1,19 +1,19 @@
<script setup lang="ts">
import hotkeys from 'hotkeys-js'
import Header from './components/Header/index.vue'
import MainSidebar from './components/MainSidebar/index.vue'
import SubSidebar from './components/SubSidebar/index.vue'
import Topbar from './components/Topbar/index.vue'
import Search from './components/Search/index.vue'
import HotkeysIntro from './components/HotkeysIntro/index.vue'
import AppSetting from './components/AppSetting/index.vue'
import LinkView from './components/views/link.vue'
import Copyright from './components/Copyright/index.vue'
import BackTop from './components/BackTop/index.vue'
import useSettingsStore from '@/store/modules/settings'
import useKeepAliveStore from '@/store/modules/keepAlive'
import useMenuStore from '@/store/modules/menu'
import useSettingsStore from '@/store/modules/settings'
import eventBus from '@/utils/eventBus'
import hotkeys from 'hotkeys-js'
import AppSetting from './components/AppSetting/index.vue'
import BackTop from './components/BackTop/index.vue'
import Copyright from './components/Copyright/index.vue'
import Header from './components/Header/index.vue'
import HotkeysIntro from './components/HotkeysIntro/index.vue'
import MainSidebar from './components/MainSidebar/index.vue'
import Search from './components/Search/index.vue'
import SubSidebar from './components/SubSidebar/index.vue'
import Topbar from './components/Topbar/index.vue'
import LinkView from './components/views/link.vue'
defineOptions({
name: 'Layout',

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
withDefaults(
defineProps<{
text: string
text?: string
enable?: boolean
}>(),
{

View File

@ -1,18 +1,18 @@
import '@/utils/system.copyright'
import FloatingVue from 'floating-vue'
import 'floating-vue/dist/style.css'
import Message from 'vue-m-message'
import 'vue-m-message/dist/style.css'
import 'overlayscrollbars/overlayscrollbars.css'
import App from './App.vue'
import pinia from './store'
import router from './router'
import pinia from './store'
import ui from './ui-provider'
import '@/utils/system.copyright'
import 'floating-vue/dist/style.css'
import 'vue-m-message/dist/style.css'
import 'overlayscrollbars/overlayscrollbars.css'
// 自定义指令
import directive from '@/utils/directive'

View File

@ -1,7 +1,7 @@
import MultilevelMenuExample from './modules/multilevel.menu.example'
import type { Menu } from '#/global'
import MultilevelMenuExample from './modules/multilevel.menu.example'
const menu: Menu.recordMainRaw[] = [
{
meta: {

View File

@ -1,5 +1,5 @@
import { defineFakeRoute } from 'vite-plugin-fake-server/client'
import Mock from 'mockjs'
import { defineFakeRoute } from 'vite-plugin-fake-server/client'
export default defineFakeRoute([
{

View File

@ -1,12 +1,12 @@
import type { RouteRecordRaw, Router } from 'vue-router'
import { useNProgress } from '@vueuse/integrations/useNProgress'
import '@/assets/styles/nprogress.css'
import { asyncRoutes, asyncRoutesByFilesystem } from './routes'
import type { Router, RouteRecordRaw } from 'vue-router'
import useKeepAliveStore from '@/store/modules/keepAlive'
import useMenuStore from '@/store/modules/menu'
import useRouteStore from '@/store/modules/route'
import useSettingsStore from '@/store/modules/settings'
import useUserStore from '@/store/modules/user'
import useRouteStore from '@/store/modules/route'
import useMenuStore from '@/store/modules/menu'
import useKeepAliveStore from '@/store/modules/keepAlive'
import { useNProgress } from '@vueuse/integrations/useNProgress'
import { asyncRoutes, asyncRoutesByFilesystem } from './routes'
import '@/assets/styles/nprogress.css'
function setupRoutes(router: Router) {
router.beforeEach(async (to, from, next) => {

View File

@ -1,11 +1,11 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import { loadingFadeOut } from 'virtual:app-loading'
import setupGuards from './guards'
// 路由相关数据
import { constantRoutes, constantRoutesByFilesystem } from './routes'
import pinia from '@/store'
import useSettingsStore from '@/store/modules/settings'
import { loadingFadeOut } from 'virtual:app-loading'
import { createRouter, createWebHashHistory } from 'vue-router'
import setupGuards from './guards'
// 路由相关数据
import { constantRoutes, constantRoutesByFilesystem } from './routes'
const router = createRouter({
history: createWebHashHistory(),

View File

@ -1,9 +1,9 @@
import { setupLayouts } from 'virtual:meta-layouts'
import generatedRoutes from 'virtual:generated-pages'
import type { RouteRecordRaw } from 'vue-router'
import MultilevelMenuExample from './modules/multilevel.menu.example'
import type { Route } from '#/global'
import type { RouteRecordRaw } from 'vue-router'
import useSettingsStore from '@/store/modules/settings'
import generatedRoutes from 'virtual:generated-pages'
import { setupLayouts } from 'virtual:meta-layouts'
import MultilevelMenuExample from './modules/multilevel.menu.example'
// 固定路由(默认路由)
const constantRoutes: RouteRecordRaw[] = [
@ -79,9 +79,9 @@ const asyncRoutesByFilesystem = setupLayouts(generatedRoutes.filter((item) => {
}))
export {
constantRoutes,
systemRoutes,
asyncRoutes,
constantRoutesByFilesystem,
asyncRoutesByFilesystem,
constantRoutes,
constantRoutesByFilesystem,
systemRoutes,
}

View File

@ -1,6 +1,6 @@
import { defaultsDeep } from 'lodash-es'
import type { RecursiveRequired, Settings } from '#/global'
import settingsDefault from '@/settings.default'
import { defaultsDeep } from 'lodash-es'
const globalSettings: Settings.all = {
// 请在此处编写或粘贴配置代码

View File

@ -1,12 +1,12 @@
import { cloneDeep } from 'lodash-es'
import type { Menu, Route } from '#/global'
import type { RouteRecordRaw } from 'vue-router'
import useSettingsStore from './settings'
import useUserStore from './user'
import useRouteStore from './route'
import { resolveRoutePath } from '@/utils'
import apiApp from '@/api/modules/app'
import menu from '@/menu'
import type { Menu, Route } from '#/global'
import { resolveRoutePath } from '@/utils'
import { cloneDeep } from 'lodash-es'
import useRouteStore from './route'
import useSettingsStore from './settings'
import useUserStore from './user'
const useMenuStore = defineStore(
// 唯一ID

View File

@ -1,10 +1,10 @@
import { cloneDeep } from 'lodash-es'
import type { RouteRecordRaw } from 'vue-router'
import useSettingsStore from './settings'
import { resolveRoutePath } from '@/utils'
import { systemRoutes } from '@/router/routes'
import apiApp from '@/api/modules/app'
import type { Route } from '#/global'
import type { RouteRecordRaw } from 'vue-router'
import apiApp from '@/api/modules/app'
import { systemRoutes } from '@/router/routes'
import { resolveRoutePath } from '@/utils'
import { cloneDeep } from 'lodash-es'
import useSettingsStore from './settings'
const useRouteStore = defineStore(
// 唯一ID

View File

@ -1,7 +1,7 @@
import { defaultsDeep } from 'lodash-es'
import type { RouteMeta } from 'vue-router'
import type { Settings } from '#/global'
import type { RouteMeta } from 'vue-router'
import settingsDefault from '@/settings'
import { defaultsDeep } from 'lodash-es'
const useSettingsStore = defineStore(
// 唯一ID

View File

@ -1,6 +1,6 @@
import type { Tabbar } from '#/global'
import type { RouteLocationNormalized } from 'vue-router'
import useKeepAliveStore from './keepAlive'
import type { Tabbar } from '#/global'
const useTabbarStore = defineStore(
// 唯一ID

View File

@ -1,8 +1,8 @@
import useSettingsStore from './settings'
import useRouteStore from './route'
import useMenuStore from './menu'
import router from '@/router'
import apiUser from '@/api/modules/user'
import router from '@/router'
import useMenuStore from './menu'
import useRouteStore from './route'
import useSettingsStore from './settings'
const useUserStore = defineStore(
// 唯一ID

View File

@ -1,4 +1,4 @@
import type { RouteRecordName, RouteRecordRaw } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
type RecursiveRequired<T> = {
[P in keyof T]-?: RecursiveRequired<T[P]>

View File

@ -1,5 +1,5 @@
import useSettingsStore from '@/store/modules/settings'
import useMenuStore from '@/store/modules/menu'
import useSettingsStore from '@/store/modules/settings'
export default function useMenu() {
const router = useRouter()

View File

@ -1,6 +1,6 @@
import type { RouteLocationRaw } from 'vue-router'
import Message from 'vue-m-message'
import useTabbarStore from '@/store/modules/tabbar'
import Message from 'vue-m-message'
export default function useTabbar() {
const route = useRoute()

View File

@ -1,11 +1,9 @@
export default function useViewTransition(callback: () => void) {
function startViewTransition() {
// @ts-expect-error: View Transition API
if (!document.startViewTransition || window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
callback()
return
}
// @ts-expect-error: View Transition API
return document.startViewTransition(async () => {
await Promise.resolve(callback())
})

View File

@ -1,4 +1,5 @@
import type { Theme } from 'unocss/preset-uno'
import { entriesToCss, toArray } from '@unocss/core'
import {
defineConfig,
presetAttributify,
@ -9,7 +10,6 @@ import {
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import { entriesToCss, toArray } from '@unocss/core'
import { presetScrollbar } from 'unocss-preset-scrollbar'
import { darkTheme, lightTheme } from './themes'

View File

@ -1,8 +1,8 @@
import fs from 'node:fs'
import path from 'node:path'
import process from 'node:process'
import { defineConfig, loadEnv } from 'vite'
import dayjs from 'dayjs'
import { defineConfig, loadEnv } from 'vite'
import pkg from './package.json'
import createVitePlugins from './vite/plugins'

View File

@ -1,24 +1,24 @@
import type { PluginOption } from 'vite'
import path from 'node:path'
import process from 'node:process'
import type { PluginOption } from 'vite'
import vueLegacy from '@vitejs/plugin-legacy'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import vueLegacy from '@vitejs/plugin-legacy'
import VueDevTools from 'vite-plugin-vue-devtools'
import autoImport from 'unplugin-auto-import/vite'
import components from 'unplugin-vue-components/vite'
import Unocss from 'unocss/vite'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import { vitePluginFakeServer } from 'vite-plugin-fake-server'
import Layouts from 'vite-plugin-vue-meta-layouts'
import Pages from 'vite-plugin-pages'
import { compression } from 'vite-plugin-compression2'
import Archiver from 'vite-plugin-archiver'
import AppLoading from 'vite-plugin-app-loading'
import TurboConsole from 'unplugin-turbo-console/vite'
import banner from 'vite-plugin-banner'
import boxen from 'boxen'
import picocolors from 'picocolors'
import Unocss from 'unocss/vite'
import autoImport from 'unplugin-auto-import/vite'
import TurboConsole from 'unplugin-turbo-console/vite'
import components from 'unplugin-vue-components/vite'
import AppLoading from 'vite-plugin-app-loading'
import Archiver from 'vite-plugin-archiver'
import banner from 'vite-plugin-banner'
import { compression } from 'vite-plugin-compression2'
import { vitePluginFakeServer } from 'vite-plugin-fake-server'
import Pages from 'vite-plugin-pages'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import VueDevTools from 'vite-plugin-vue-devtools'
import Layouts from 'vite-plugin-vue-meta-layouts'
export default function createVitePlugins(viteEnv, isBuild = false) {
const vitePlugins: (PluginOption | PluginOption[])[] = [