mirror of
https://github.com/lstoeferle/vite-vue2-starter
synced 2025-02-23 05:02:19 +08:00
feat: update to Vite v5
This commit is contained in:
parent
af89d63382
commit
a143655876
23
package.json
23
package.json
@ -9,24 +9,23 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@vueuse/core": "^9.13.0",
|
||||
"core-js": "^3.29.1",
|
||||
"vue": "^2.7.14",
|
||||
"vue": "^2.7.16",
|
||||
"vue-router": "^3.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.38.2",
|
||||
"@iconify/json": "^2.2.42",
|
||||
"@vitejs/plugin-vue2": "^2.2.0",
|
||||
"@antfu/eslint-config": "^1.2.1",
|
||||
"@iconify/json": "^2.2.186",
|
||||
"@vitejs/plugin-vue2": "^2.3.1",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"eslint": "^8.37.0",
|
||||
"husky": "^8.0.3",
|
||||
"eslint": "^8.57.0",
|
||||
"husky": "^9.0.11",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5.0.3",
|
||||
"unplugin-auto-import": "^0.15.2",
|
||||
"typescript": "^5.3.3",
|
||||
"unplugin-auto-import": "^0.17.5",
|
||||
"unplugin-icons": "^0.16.1",
|
||||
"unplugin-vue-components": "^0.24.1",
|
||||
"vite": "^4.2.1",
|
||||
"vue-template-compiler": "^2.7.14",
|
||||
"unplugin-vue-components": "^0.26.0",
|
||||
"vite": "^5.1.4",
|
||||
"vue-template-compiler": "^2.7.16",
|
||||
"vue-template-es2015-compiler": "^1.9.1"
|
||||
}
|
||||
}
|
||||
|
1812
pnpm-lock.yaml
1812
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
13
src/auto-imports.d.ts
vendored
13
src/auto-imports.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
@ -16,13 +17,16 @@ declare global {
|
||||
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
|
||||
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
|
||||
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
|
||||
const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate']
|
||||
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
|
||||
const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
|
||||
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
|
||||
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
||||
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
|
||||
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
|
||||
const extendRef: typeof import('@vueuse/core')['extendRef']
|
||||
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
|
||||
const injectLocal: typeof import('@vueuse/core')['injectLocal']
|
||||
const isDefined: typeof import('@vueuse/core')['isDefined']
|
||||
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
|
||||
const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
|
||||
@ -30,6 +34,7 @@ declare global {
|
||||
const onLongPress: typeof import('@vueuse/core')['onLongPress']
|
||||
const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
|
||||
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
|
||||
const provideLocal: typeof import('@vueuse/core')['provideLocal']
|
||||
const reactify: typeof import('@vueuse/core')['reactify']
|
||||
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
|
||||
const reactiveComputed: typeof import('@vueuse/core')['reactiveComputed']
|
||||
@ -56,11 +61,14 @@ declare global {
|
||||
const unrefElement: typeof import('@vueuse/core')['unrefElement']
|
||||
const until: typeof import('@vueuse/core')['until']
|
||||
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
|
||||
const useAnimate: typeof import('@vueuse/core')['useAnimate']
|
||||
const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
|
||||
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
|
||||
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
|
||||
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
|
||||
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
|
||||
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
|
||||
const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes']
|
||||
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
|
||||
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
|
||||
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
|
||||
@ -76,6 +84,7 @@ declare global {
|
||||
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
|
||||
const useCached: typeof import('@vueuse/core')['useCached']
|
||||
const useClipboard: typeof import('@vueuse/core')['useClipboard']
|
||||
const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems']
|
||||
const useCloned: typeof import('@vueuse/core')['useCloned']
|
||||
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
||||
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
||||
@ -143,6 +152,8 @@ declare global {
|
||||
const useOnline: typeof import('@vueuse/core')['useOnline']
|
||||
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
|
||||
const useParallax: typeof import('@vueuse/core')['useParallax']
|
||||
const useParentElement: typeof import('@vueuse/core')['useParentElement']
|
||||
const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver']
|
||||
const usePermission: typeof import('@vueuse/core')['usePermission']
|
||||
const usePointer: typeof import('@vueuse/core')['usePointer']
|
||||
const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
|
||||
@ -206,7 +217,9 @@ declare global {
|
||||
const watchArray: typeof import('@vueuse/core')['watchArray']
|
||||
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
||||
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
|
||||
const watchDeep: typeof import('@vueuse/core')['watchDeep']
|
||||
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
|
||||
const watchImmediate: typeof import('@vueuse/core')['watchImmediate']
|
||||
const watchOnce: typeof import('@vueuse/core')['watchOnce']
|
||||
const watchPausable: typeof import('@vueuse/core')['watchPausable']
|
||||
const watchThrottled: typeof import('@vueuse/core')['watchThrottled']
|
||||
|
@ -1,12 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, getCurrentInstance } from 'vue'
|
||||
import { useRoute } from 'vue-router/composables'
|
||||
import { routes } from '@/router'
|
||||
|
||||
// Import config from .env
|
||||
const appName = import.meta.env.VITE_APP_NAME
|
||||
|
||||
const currentRoute = useRoute()
|
||||
|
||||
const availableRoutes = routes.filter(route => route.name !== 'NotFound')
|
||||
const currentRoute = computed(() => getCurrentInstance()?.proxy?.$route)
|
||||
|
||||
const isDark = useDark()
|
||||
const toggle = useToggle(isDark)
|
||||
|
Loading…
Reference in New Issue
Block a user