1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import { defineConfig } from "vite";
- import vue from "@vitejs/plugin-vue";
- import ViteComponents from "unplugin-vue-components/vite";
- import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
- const SERVER_URL = "https://192.168.10.39";
- const path = require("path");
- // https://vitejs.dev/config/
- export default defineConfig({
- plugins: [
- vue({
- reactivityTransform: true,
- }),
- ViteComponents({
- resolvers: [AntDesignVueResolver()],
- dts: true,
- }),
- ],
- server: {
- port: 3000,
- // strictPort: true,
- fs: {
- strict: true,
- allow: ["./"],
- },
- proxy: {
- "/api": {
- target: SERVER_URL,
- changeOrigin: true,
- },
- },
- },
- resolve: {
- alias: [{ find: "@", replacement: path.resolve(__dirname, "./src") }],
- extensions: [".js", ".mjs", ".ts", ".vue", ".json", ".scss", ".css"],
- },
- build: {
- ssr: false,
- },
- // define: {
- // __VUE_PROD_DEVTOOLS__: true, // no effect
- // },
- });
|