init project
This commit is contained in:
50
vite.config.ts
Normal file
50
vite.config.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
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: 5174
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user