- replace uni-ui drawer and icon components with Vant equivalents - add unplugin-auto-import and unplugin-vue-components to Vite config - update project dependencies to compatible versions - generate auto-import and component type declaration files - clean up deprecated imports and commented code in home page components - fix App.vue to use lowercase router-view and script setup
43 lines
949 B
TypeScript
43 lines
949 B
TypeScript
import vue from "@vitejs/plugin-vue";
|
|
import AutoImport from "unplugin-auto-import/vite";
|
|
import Components from "unplugin-vue-components/vite";
|
|
import { VantResolver } from "@vant/auto-import-resolver";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import viteLegacy from "@vitejs/plugin-legacy";
|
|
import viteVueJsx from "@vitejs/plugin-vue-jsx";
|
|
import path from "path";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
resolvers: [VantResolver()],
|
|
}),
|
|
Components({
|
|
resolvers: [VantResolver()],
|
|
}),
|
|
viteLegacy(),
|
|
viteVueJsx(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.join(__dirname, "./src"),
|
|
},
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
api: "modern-compiler",
|
|
silenceDeprecations: ["legacy-js-api"],
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 5174,
|
|
open: false,
|
|
},
|
|
});
|