| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import path from 'node:path';
- import { defineConfig, loadConfigFromFile, loadEnv } from "vite";
- import Components from "unplugin-vue-components/vite";
- const config = defineConfig(({ command, mode, ssrBuild }) => {
- return {
-
- plugins: [
- Components({
- dirs: ["src/pc/components", "src/pc/pages/**/_components"],
- resolvers: [
- ],
- dts: "src/pc/components.d.ts",
- }),
- ],
- server: {
- port: 3333,
- proxy: {
- '/api': {
- target: 'http://127.0.0.1:9011/', //测试服务器的
- changeOrigin: true,
- ws: true,
- pathRewrite: {
- '^/api': ''
- }
- }
- }
- },
- }
- });
- export default config;
|