🐳 chore: 增加依赖

This commit is contained in:
m1m1sha 2024-05-05 23:10:42 +08:00
parent 14df3d3075
commit 14a391d4fc
5 changed files with 139 additions and 32 deletions

View File

@ -1,2 +1,6 @@
shamefully-hoist=true shamefully-hoist=true
<<<<<<< HEAD
strict-peer-dependencies=false strict-peer-dependencies=false
=======
strict-peer-dependencies=false
>>>>>>> fda0565 (🐳 chore: 增加依赖)

View File

@ -0,0 +1,7 @@
// @ts-check
import antfu from "@antfu/eslint-config";
export default antfu({
unocss: true,
formatters: true,
});

View File

@ -14,24 +14,35 @@
"pinia": "^2.1.7", "pinia": "^2.1.7",
"primeflex": "^3.3.1", "primeflex": "^3.3.1",
"primeicons": "^7.0.0", "primeicons": "^7.0.0",
"primevue": "^3.51.0", "primevue": "^3.52.0",
"vue": "^3.3.4", "vue": "^3.4.26",
"vue-router": "^4.3.0" "vue-i18n": "^9.13.1",
"vue-router": "^4.3.2"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^2.16.1",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@tauri-apps/cli": "^1", "@tauri-apps/cli": "^1",
"@types/node": "^20.12.8",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
"@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue": "^5.0.4",
"eslint": "^9.2.0",
"autoprefixer": "^10.4.19", "autoprefixer": "^10.4.19",
"naive-ui": "^2.38.1", "naive-ui": "^2.38.2",
"postcss": "^8.4.38", "postcss": "^8.4.38",
"tailwindcss": "^3.4.3", "tailwindcss": "^3.4.3",
"typescript": "^5.0.2", "typescript": "^5.4.5",
"unplugin-vue-components": "^0.26.0", "unplugin-auto-import": "^0.17.5",
"unplugin-vue-components": "^0.27.0",
"unplugin-vue-macros": "^2.9.2",
"unplugin-vue-markdown": "^0.26.2",
"unplugin-vue-router": "^0.8.6",
"uuid": "^9.0.1", "uuid": "^9.0.1",
"vfonts": "^0.0.3", "vfonts": "^0.0.3",
"vite": "^5.0.0", "vite": "^5.2.11",
"vue-i18n": "^9.12.0", "vite-plugin-vue-devtools": "^7.1.3",
"vue-tsc": "^1.8.5" "vite-plugin-vue-layouts": "^0.11.0",
"vue-i18n": "^9.13.1",
"vue-tsc": "^2.0.16"
} }
} }

View File

@ -1,25 +1,45 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2020", "target": "ESNext",
"useDefineForClassFields": true, "jsx": "preserve",
"lib": [
"DOM",
"ESNext"
],
"baseUrl": ".",
"module": "ESNext", "module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler", "moduleResolution": "bundler",
"allowImportingTsExtensions": true, "allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true, "noEmit": true,
"jsx": "preserve", "paths": {
"~/*": [
/* Linting */ "src/*"
"strict": true, ]
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
}, },
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], "resolveJsonModule": true,
"references": [{ "path": "./tsconfig.node.json" }] "types": [
"vite/client",
"vite-plugin-vue-layouts/client",
"unplugin-vue-macros/macros-global",
"unplugin-vue-router/client"
],
"allowJs": true,
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true
},
"vueCompilerOptions": {
"plugins": [
"@vue-macros/volar/define-models",
"@vue-macros/volar/define-slots"
]
},
"exclude": [
"dist",
"node_modules"
]
} }

View File

@ -1,19 +1,84 @@
import { defineConfig } from "vite"; import path from 'node:path'
import vue from "@vitejs/plugin-vue"; import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite'; import Layouts from 'vite-plugin-vue-layouts'
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
import VueMacros from 'unplugin-vue-macros/vite'
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
import VueDevTools from 'vite-plugin-vue-devtools'
import VueRouter from 'unplugin-vue-router/vite'
import { VueRouterAutoImports } from 'unplugin-vue-router'
import { PrimeVueResolver } from 'unplugin-vue-components/resolvers'; import { PrimeVueResolver } from 'unplugin-vue-components/resolvers';
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig(async () => ({ export default defineConfig(async () => ({
resolve: {
alias: {
"~/": `${path.resolve(__dirname, "src")}/`,
},
},
plugins: [ plugins: [
vue(), VueMacros({
plugins: {
vue: Vue({
include: [/\.vue$/, /\.md$/],
}),
},
}),
// https://github.com/posva/unplugin-vue-router
VueRouter({
extensions: ['.vue', '.md'],
dts: 'src/typed-router.d.ts',
}),
// https://github.com/JohnCampionJr/vite-plugin-vue-layouts
Layouts(),
// https://github.com/antfu/unplugin-auto-import
AutoImport({
imports: [
'vue',
'vue-i18n',
'pinia',
VueRouterAutoImports,
{
// add any other imports you were relying on
'vue-router/auto': ['useLink'],
},
],
dts: 'src/auto-imports.d.ts',
dirs: [
'src/composables',
'src/stores',
],
vueTemplate: true,
}),
// https://github.com/antfu/unplugin-vue-components
Components({ Components({
dts: true, // allow auto load markdown components under `./src/components/`
extensions: ['vue', 'md'],
// allow auto import and register components used in markdown
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
dts: 'src/components.d.ts',
resolvers: [ resolvers: [
PrimeVueResolver() PrimeVueResolver()
] ]
})], }),
// https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n
VueI18n({
runtimeOnly: true,
compositionOnly: true,
fullInstall: true,
include: [path.resolve(__dirname, 'locales/**')],
}),
// https://github.com/webfansplz/vite-plugin-vue-devtools
VueDevTools(),
],
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
// //