54 lines
1.0 KiB
TypeScript
54 lines
1.0 KiB
TypeScript
import { fileURLToPath, URL } from "node:url";
|
|
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import AutoImport from "unplugin-auto-import/vite";
|
|
import Components from "unplugin-vue-components/vite";
|
|
import { TDesignResolver } from "unplugin-vue-components/resolvers";
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url))
|
|
}
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
imports: ["vue", "vue-router", "pinia"],
|
|
dts: "auto-imports.d.ts",
|
|
eslintrc: {
|
|
enabled: true,
|
|
filepath: "./.eslintrc-auto-import.json",
|
|
globalsPropValue: true
|
|
},
|
|
resolvers: [
|
|
TDesignResolver({
|
|
library: "mobile-vue"
|
|
})
|
|
]
|
|
}),
|
|
Components({
|
|
dirs: ["src/components", "src/layout"],
|
|
dts: "components.d.ts",
|
|
resolvers: [
|
|
TDesignResolver({
|
|
library: "mobile-vue"
|
|
})
|
|
]
|
|
})
|
|
],
|
|
css: {
|
|
preprocessorOptions: {
|
|
less: {
|
|
javascriptEnabled: true
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
port: 84,
|
|
allowedHosts: [
|
|
"server.imyeyu.dev"
|
|
]
|
|
}
|
|
});
|