39 lines
790 B
TypeScript
Executable file
39 lines
790 B
TypeScript
Executable file
import { defineConfig } from "vite"
|
|
import vuePlugin from "@vitejs/plugin-vue"
|
|
import iconsPlugin from "unplugin-icons/vite"
|
|
import vueRouterPlugin from "unplugin-vue-router/vite"
|
|
import unocssPlugin from "unocss/vite"
|
|
import { resolve } from "node:path"
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vueRouterPlugin({
|
|
dts: "./src/generated-types/router.d.ts",
|
|
routesFolder: "./src/pages",
|
|
}),
|
|
unocssPlugin(),
|
|
iconsPlugin(),
|
|
vuePlugin()
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": resolve(__dirname, "./src")
|
|
}
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
api: "modern-compiler"
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:80",
|
|
ws: true
|
|
}
|
|
},
|
|
allowedHosts: true
|
|
}
|
|
})
|